Need to monitor Nagios Service Automatically

Asrai khn asraikhn at gmail.com
Wed Jan 27 11:20:22 CET 2010


On Wed, Jan 27, 2010 at 3:03 PM, Martin Melin <martinm at op5.org> wrote:

>
> On Wed, Jan 27, 2010 at 10:39 AM, Asrai khn <asraikhn at gmail.com> wrote:
>
>>
>>
>> On Wed, Jan 27, 2010 at 12:54 PM, Martin Melin <martinm at op5.org> wrote:
>>
>>> On Wed, Jan 27, 2010 at 8:30 AM, Sunny Soung <loesprite at gmail.com>wrote:
>>>
>>>> Hi everyone,
>>>>
>>>> I'm using Nagios to monitor some servers. All the things are good. But
>>>> these days I'm thinking about one question - What if Nagios went down??
>>>> If my Nagios went down, I would never get any notification. That would
>>>> be really bad.
>>>>
>>>
>>> I agree, that is a very bad thing :-)
>>>
>>>
>>>> *So is there a good solution to monitor the Nagios service??*
>>>>
>>>
>>> It depends on how much effort you want to spend and how critical Nagios
>>> is for your organization. If you just want to know if Nagios goes down, you
>>> can simply set up a second machine to monitor your Nagios host and notify
>>> you when it goes down or stops working. However this means that your other
>>> machines are unmonitored for the time it takes you to get your Nagios
>>> machine back online - and in case of hardware failure that could take a
>>> while.
>>>
>>> Most people for whom Nagios is a critical tool implement some sort of
>>> redundancy instead, where Nagios continues to monitor your network even if
>>> an individual Nagios host goes down. There is a good overview of your
>>> options in the documentation:
>>> http://nagios.sourceforge.net/docs/3_0/redundancy.html
>>>
>>> Also, the smartass answer to "is there a good solution to monitor the
>>> Nagios service" is http://nagiosplugins.org/man/check_nagios
>>>
>>>
>>
>>
>> In check_nagios example they have given nagios.log but I thinks it should
>> be 'status.dat', for example in my case when nagios is installed from binary
>> package..
>>
>> /usr/lib/nagios/plugins/check_nagios -e 5 -F /var/nagios/status.dat -C
>> /usr/bin/nagios
>> NAGIOS OK: 1 process, status log updated 9 seconds ago
>>
>> I am interesting in implementing this check, any other example will be
>> greatly appreciated.
>>
>
> check_nagios is not very complicated. Per the manpage, it wants to be
> pointed to status.log, not nagios.log or status.dat. The reason for that is
> simply that it checks that the last entry in the log is within N minutes of
> the current time (set by -e 5 to 5 minutes). It also checks that a Nagios
> process is present in ps. What kind of examples are you looking for?
>
>
Thanks for the explanation.

I am looking for usage examples, and I thinks the one given in the
check_nagios manpage is fine.

/usr/lib/nagios/plugins/check_nagios -e 5 -F /var/nagios/status.dat -C
/usr/bin/nagios




>
>> Thanks.
>>
>>
>>
>>>  Advise will be appreciated.
>>>>
>>>> Thanks and regards,
>>>> Sunny,
>>>>
>>>>
>>>> ------------------------------------------------------------------------------
>>>> The Planet: dedicated and managed hosting, cloud storage, colocation
>>>> Stay online with enterprise data centers and the best network in the
>>>> business
>>>> Choose flexible plans and management services without long-term
>>>> contracts
>>>> Personal 24x7 support from experience hosting pros just a phone call
>>>> away.
>>>> http://p.sf.net/sfu/theplanet-com
>>>> _______________________________________________
>>>> Nagios-users mailing list
>>>> Nagios-users at lists.sourceforge.net
>>>> https://lists.sourceforge.net/lists/listinfo/nagios-users
>>>> ::: Please include Nagios version, plugin version (-v) and OS when
>>>> reporting any issue.
>>>> ::: Messages without supporting info will risk being sent to /dev/null
>>>>
>>>
>>>
>>>
>>> --
>>> Martin Melin
>>> ____________________________
>>> op5 AB
>>> http://www.op5.com
>>>
>>> http://www.op5.org/
>>> http://www.op5.com/op5/products/network-monitor/nagios/
>>>
>>>
>>> ------------------------------------------------------------------------------
>>> The Planet: dedicated and managed hosting, cloud storage, colocation
>>> Stay online with enterprise data centers and the best network in the
>>> business
>>> Choose flexible plans and management services without long-term contracts
>>> Personal 24x7 support from experience hosting pros just a phone call
>>> away.
>>> http://p.sf.net/sfu/theplanet-com
>>> _______________________________________________
>>> Nagios-users mailing list
>>> Nagios-users at lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/nagios-users
>>> ::: Please include Nagios version, plugin version (-v) and OS when
>>> reporting any issue.
>>> ::: Messages without supporting info will risk being sent to /dev/null
>>>
>>
>>
>>
>> ------------------------------------------------------------------------------
>> The Planet: dedicated and managed hosting, cloud storage, colocation
>> Stay online with enterprise data centers and the best network in the
>> business
>> Choose flexible plans and management services without long-term contracts
>> Personal 24x7 support from experience hosting pros just a phone call away.
>> http://p.sf.net/sfu/theplanet-com
>> _______________________________________________
>> Nagios-users mailing list
>> Nagios-users at lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/nagios-users
>> ::: Please include Nagios version, plugin version (-v) and OS when
>> reporting any issue.
>> ::: Messages without supporting info will risk being sent to /dev/null
>>
>
>
>
> --
> Martin Melin
> ____________________________
> op5 AB
> http://www.op5.com
>
> http://www.op5.org/
> http://www.op5.com/op5/products/network-monitor/nagios/
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-lists.org/archive/users/attachments/20100127/c208a3fd/attachment.html>
-------------- next part --------------
------------------------------------------------------------------------------
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com
-------------- next part --------------
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null


More information about the Users mailing list