Host checks instead of service checks
Deborah Martin
Deborah.Martin at Kognitio.com
Mon Mar 16 18:34:57 CET 2009
Folks,
Whilst using check_dummy as a service check does resolve the pre-flight
warnings, it's not the solution I think I'm looking for.
The total number of service checks now includes the dummy checks which i've
chosen to always exit as UP so that it doesn't show up as a service problem
- which to me
doesn't sound like the right way to do this. I want all service checks to be
useful service checks rather than have checks which would need to be ignored
as they don't return
anything useful as with check_dummy - I wouldn't ever use that check in any
Nagios SLA reporting.
What I really want to do is the following :
Hosts -->> ssh check -->> When "CRITICAL" alert under "Host problems" only.
The docs show a distinct difference for behaviour between Nagios 2.0b4 and
Nagios 3.0.6.
>From Nagios 2.0b4, under Host Definitions:-
check_command: This directive is used to specify the short name of the
<http://193.35.206.171/nagios/docs/xodtemplate.html#command> command that
should be used to check if the host is up or down. Typically, this command
would try and ping the host to see if it is "alive". The command must return
a status of OK (0) or Nagios will assume the host is down. If you leave this
argument blank, the host will not be checked - Nagios will always assume the
host is up. This is useful if you are monitoring printers or other devices
that are frequently turned off. The maximum amount of time that the
notification command can run is controlled by the
<http://193.35.206.171/nagios/docs/configmain.html#host_check_timeout>
host_check_timeout option.
>From Nagios 3.0.6
check_command: This directive is used to specify the short name of the
<http://193.35.206.117/nagios/docs/objectdefinitions.html#command> command
that should be used to check if the host is up or down. Typically, this
command would try and ping the host to see if it is "alive". The command
must return a status of OK (0) or Nagios will assume the host is down. If
you leave this argument blank, the host will not be actively checked. Thus,
Nagios will likely always assume the host is up (it may show up as being in
a "PENDING" state in the web interface). This is useful if you are
monitoring printers or other devices that are frequently turned off. The
maximum amount of time that the notification command can run is controlled
by the
<http://193.35.206.117/nagios/docs/configmain.html#host_check_timeout>
host_check_timeout option.
The difference is highlighted in RED. So on changing the "ssh check" from a
service to a host definition (to prevent PENDING on the hosts), the
pre-flight warnings now complain there are no services associated with the
hosts. On big systems here (100 nodes+) this makes the pre-flight output
really unreadable and not really accurate as surely we should be able to
choose whether something is a host check or service check but not have to
define BOTH!
Ultimately, I just want to filter SSH check problems to appear under "Host
problems" rather than under "Service problems" so users can easily spot
other service problem issues and not have to trawl through 100's of lines of
output in the web interface. Believe me, Nagios web interface users can be a
fickle bunch!
A switch to tell Nagios to not complain about this would be really useful
unless anyone thinks of a good reason why this would be a bad idea.
any help / pointers would be appreciated, even if it's to tell me politely
how stupid i'm being - I can take it!
regards,
deborah
_____
From: Deborah Martin [mailto:Deborah.Martin at Kognitio.com]
Sent: 16 March 2009 15:34
To: 'Richard Quintin'
Cc: nagios-users at lists.sourceforge.net
Subject: Re: [Nagios-users] Host checks instead of service checks
Thanks Richard. I'll give that a try.
regards,
deborah
-----Original Message-----
From: Richard Quintin [mailto:rich+nagios at quintinz.com
<mailto:rich+nagios at quintinz.com> ]
Sent: 16 March 2009 15:26
To: Deborah Martin
Cc: nagios-users at lists.sourceforge.net
Subject: Re: [Nagios-users] Host checks instead of service checks
You could use check_dummy for the host check and just have it always return
OK.
Or perhaps the opposite you could add a check_dummy service check for all
hosts.
Which you choose will depend upon your personal preference and how you want
dependencies to be handled.
On Mon, Mar 16, 2009 at 11:06 AM, Deborah Martin
<Deborah.Martin at kognitio.com> wrote:
> Hi Folks,
>
> Currently, the main nagios box (running old version of SuSE) and
> Nagios
> 2.0b4 is running just with service checks, one of which is an ssh
> check (we don't allow ping)
>
> So in the web interface, I see all hosts as up.
>
> However, I've built a new box (which hopefully will replace the above)
> with SLES 10SP1 and Nagios 3.0.6. I've put the same config files
> (services.cfg and hosts.cfg)
>
> on the this new system. But now the hosts all show as "Pending". So I
> then moved the ssh check from a service check to a host check and can
> see that the more hosts I move the less hosts are pending. That's good so
far...
>
> But, when I run the pre-flight check (/usr/local/nagios/bin/nagios -v
> nagios.cfg), I now get warnings to say some hosts don't have any
> service checks associated with it!
>
> This is true as some nodes will only have ssh checks against them
> whilst others will have other checks against them. I'd rather it
> didn't warn me as I have hundreds
>
> of hosts appear in the pre-flight check warnings and it now looks
> incredibly untidy to see all this.
>
> How can I get rid of these warnings ?
>
> I'm probably missing something here so any help would be appreciated.
> I'm wondering for example, if I should force the initial state to be
> UP for hosts rather than
>
> moving the ssh service check to a host check. But then what would
> happen if the service check found a node was down - would it reflect
> that in the "host problems" ?
>
> regards,
> deborah
>
> **********************************************************************
> ***** This email and any files transmitted with it are confidential
> and intended solely for the use of the individual or entity to whom
> they are addressed.
>
> Any unauthorised distribution or copying is strictly prohibited.
> Whilst Kognitio Limited takes steps to prevent the transmission of
> viruses via e-mail, we can not guarantee that any email or attachment
> is free from computer viruses and you are strongly advised to
> undertake your own anti-virus precautions.
>
> Kognitio grants no warranties regarding performance, use or quality of
> any e-mail or attachment and undertakes no liability for loss or
> damage, howsoever caused.
>
> Kognitio Limited, a company registered in England and Wales.
> Registered number 0212 7833. Registered Office: 3a Waterside Park,
> Cookham Road, Bracknell, Berks, RG12 1RB. VAT number 864 4378 92.
>
> Kognitio Inc, a company incorporated in Delaware, principal office 180
> North Stetson, Suite 3500, Chicago, IL 60601, USA
> **********************************************************************
> *****
>
> ----------------------------------------------------------------------
> -------- Apps built with the Adobe(R) Flex(R) framework and Flex
> Builder(TM) are powering Web 2.0 with engaging, cross-platform
> capabilities. Quickly and easily build your RIAs with Flex Builder,
> the Eclipse(TM)based development software that enables intelligent
> coding and step-through debugging.
> Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com
<http://p.sf.net/sfu/www-adobe-com>
> _______________________________________________
> Nagios-users mailing list
> Nagios-users at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/nagios-users
<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
>
--
Richard Quintin, DBA
Database & Application Administration
Virginia Tech
***************************************************************************
This email and any files transmitted with it are confidential and intended
solely for the use of the individual or entity to whom they are addressed.
Any unauthorised distribution or copying is strictly prohibited.
Whilst Kognitio Limited takes steps to prevent the transmission of viruses
via e-mail, we can not guarantee that any email or attachment is free from
computer viruses and you are strongly advised to undertake your own
anti-virus precautions.
Kognitio grants no warranties regarding performance, use or quality of any
e-mail or attachment and undertakes no liability for loss or damage,
howsoever caused.
Kognitio Limited, a company registered in England and Wales. Registered
number 0212 7833. Registered Office: 3a Waterside Park, Cookham Road,
Bracknell, Berks, RG12 1RB. VAT number 864 4378 92.
Kognitio Inc, a company incorporated in Delaware, principal office 180 North
Stetson, Suite 3500, Chicago, IL 60601, USA
***************************************************************************
***************************************************************************
This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed.
Any unauthorised distribution or copying is strictly prohibited.
Whilst Kognitio Limited takes steps to prevent the transmission of viruses via e-mail, we can not guarantee that any email or attachment is free from computer viruses and you are strongly advised to undertake your own anti-virus precautions.
Kognitio grants no warranties regarding performance, use or quality of any e-mail or attachment and undertakes no liability for loss or damage, howsoever caused.
Kognitio Limited, a company registered in England and Wales. Registered number 0212 7833. Registered Office: 3a Waterside Park, Cookham Road, Bracknell, Berks, RG12 1RB. VAT number 864 4378 92.
Kognitio Inc, a company incorporated in Delaware, principal office 180 North Stetson, Suite 3500, Chicago, IL 60601, USA
***************************************************************************
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-lists.org/archive/users/attachments/20090316/e52b82e8/attachment.html>
-------------- next part --------------
------------------------------------------------------------------------------
Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are
powering Web 2.0 with engaging, cross-platform capabilities. Quickly and
easily build your RIAs with Flex Builder, the Eclipse(TM)based development
software that enables intelligent coding and step-through debugging.
Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-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