<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=US-ASCII">
<TITLE>RE: [Nagios-users] Host checks instead of service checks</TITLE>
<META content="MSHTML 6.00.6000.16809" name=GENERATOR></HEAD>
<BODY>
<DIV dir=ltr align=left><SPAN class=325395216-16032009><FONT face=Arial
color=#0000ff size=2>Folks, </FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=325395216-16032009><FONT face=Arial
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=325395216-16032009><FONT face=Arial
color=#0000ff size=2>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.
</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=325395216-16032009><FONT face=Arial
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=325395216-16032009><FONT face=Arial
color=#0000ff size=2>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 </FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=325395216-16032009><FONT face=Arial
color=#0000ff size=2>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</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=325395216-16032009><FONT face=Arial
color=#0000ff size=2>anything useful as with check_dummy - I wouldn't ever use
that check in any Nagios SLA reporting. </FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=325395216-16032009><FONT face=Arial
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=325395216-16032009><FONT face=Arial
color=#0000ff size=2>What I really want to do is the following :
</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=325395216-16032009><FONT face=Arial
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=325395216-16032009><FONT face=Arial
color=#0000ff size=2>Hosts -->> ssh check -->> When "CRITICAL" alert
under "Host problems" only. </FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=325395216-16032009><FONT face=Arial
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=325395216-16032009><FONT size=2><FONT
face=Arial color=#0000ff>The docs show a distinct difference for behaviour
between Nagios 2.0b4 and Nagios 3.0.6. </FONT></FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=325395216-16032009><FONT face=Arial
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=325395216-16032009><FONT face=Arial
color=#0000ff size=2>From Nagios 2.0b4, under Host Definitions:-
</FONT></SPAN></DIV><SPAN class=325395216-16032009><FONT color=#0000ff size=2>
<DIV dir=ltr align=left>
<TABLE class=Default border=0>
<TBODY>
<TR>
<TD vAlign=top><FONT face=Arial><FONT
size=2><STRONG>check_command</STRONG>:</FONT></FONT></TD>
<TD><FONT face=Arial size=2>This directive is used to specify the <I>short
name</I> of the </FONT><A
href="http://193.35.206.171/nagios/docs/xodtemplate.html#command"><FONT
face=Arial size=2>command</FONT></A><FONT face=Arial size=2> 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 <I>not</I> 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 </FONT><A
href="http://193.35.206.171/nagios/docs/configmain.html#host_check_timeout"><FONT
face=Arial size=2>host_check_timeout</FONT></A><FONT face=Arial size=2>
option. </FONT></TD></TR></TBODY></TABLE></DIV>
<DIV dir=ltr align=left><FONT face=Arial></FONT> </DIV>
<DIV dir=ltr align=left><FONT face=Arial></FONT> </DIV>
<DIV dir=ltr align=left><SPAN class=325395216-16032009><FONT face=Arial>From
Nagios 3.0.6 </FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=325395216-16032009>
<TABLE class=Default border=0>
<TBODY>
<TR>
<TD vAlign=top><FONT size=2><FONT
face=Arial><STRONG>check_command</STRONG>:</FONT></FONT></TD>
<TD><FONT face=Arial size=2>This directive is used to specify the <I>short
name</I> of the </FONT><A
href="http://193.35.206.117/nagios/docs/objectdefinitions.html#command"><FONT
face=Arial size=2>command</FONT></A><FONT face=Arial size=2> 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 <I>not</I> be actively checked. <FONT
color=#ff0000>Thus, Nagios will likely always assume the host is up (it
may show up as being in a "PENDING" state in the web interface).</FONT>
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 </FONT><A
href="http://193.35.206.117/nagios/docs/configmain.html#host_check_timeout"><FONT
face=Arial size=2>host_check_timeout</FONT></A><FONT face=Arial size=2>
option. </FONT></TD></TR></TBODY></TABLE></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=325395216-16032009><FONT
face=Arial></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=325395216-16032009><FONT face=Arial>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 </FONT></SPAN><SPAN
class=325395216-16032009><FONT face=Arial>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 </FONT></SPAN><SPAN
class=325395216-16032009><FONT face=Arial>whether something is a host check or
service check but not have to define BOTH!</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=325395216-16032009><FONT
face=Arial></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=325395216-16032009><FONT
face=Arial>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
</FONT></SPAN><SPAN class=325395216-16032009><FONT face=Arial>through 100's of
lines of output in the web interface. Believe me, Nagios web interface users can
be a fickle bunch! </FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=325395216-16032009><FONT
face=Arial></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=325395216-16032009><FONT face=Arial>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. </FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=325395216-16032009><FONT
face=Arial></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=325395216-16032009><FONT face=Arial>any help
/ pointers would be appreciated, even if it's to tell me politely how
stupid i'm being - I can take it! </FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=325395216-16032009><FONT
face=Arial></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=325395216-16032009><FONT
face=Arial>regards,</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=325395216-16032009><FONT
face=Arial>deborah</FONT></SPAN></DIV></FONT></SPAN>
<DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left><SPAN
class=325395216-16032009> </SPAN></DIV>
<DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left>
<HR tabIndex=-1>
</DIV>
<DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left><FONT face=Tahoma
size=2><B>From:</B> Deborah Martin [mailto:Deborah.Martin@Kognitio.com]
<BR><B>Sent:</B> 16 March 2009 15:34<BR><B>To:</B> 'Richard
Quintin'<BR><B>Cc:</B> nagios-users@lists.sourceforge.net<BR><B>Subject:</B> Re:
[Nagios-users] Host checks instead of service checks<BR></FONT><BR></DIV>
<DIV></DIV>
<P><FONT size=2>Thanks Richard. I'll give that a try. </FONT></P>
<P><FONT size=2>regards,</FONT> <BR><FONT size=2>deborah </FONT></P><BR>
<P><FONT size=2>-----Original Message-----</FONT> <BR><FONT size=2>From: Richard
Quintin [<A
href="mailto:rich+nagios@quintinz.com">mailto:rich+nagios@quintinz.com</A>]
</FONT><BR><FONT size=2>Sent: 16 March 2009 15:26</FONT> <BR><FONT size=2>To:
Deborah Martin</FONT> <BR><FONT size=2>Cc:
nagios-users@lists.sourceforge.net</FONT> <BR><FONT size=2>Subject: Re:
[Nagios-users] Host checks instead of service checks</FONT> </P>
<P><FONT size=2>You could use check_dummy for the host check and just have it
always return OK.</FONT> <BR><FONT size=2>Or perhaps the opposite you could add
a check_dummy service check for all hosts.</FONT> </P>
<P><FONT size=2>Which you choose will depend upon your personal preference and
how you want dependencies to be handled.</FONT> </P>
<P><FONT size=2>On Mon, Mar 16, 2009 at 11:06 AM, Deborah Martin
<Deborah.Martin@kognitio.com> wrote:</FONT> <BR><FONT size=2>> Hi
Folks,</FONT> <BR><FONT size=2>></FONT> <BR><FONT size=2>> Currently, the
main nagios box (running old version of SuSE) and </FONT><BR><FONT size=2>>
Nagios</FONT> <BR><FONT size=2>> 2.0b4 is running just with service checks,
one of which is an ssh </FONT><BR><FONT size=2>> check (we don't allow
ping)</FONT> <BR><FONT size=2>></FONT> <BR><FONT size=2>> So in the web
interface, I see all hosts as up.</FONT> <BR><FONT size=2>></FONT> <BR><FONT
size=2>> However, I've built a new box (which hopefully will replace the
above) </FONT><BR><FONT size=2>> with SLES 10SP1 and Nagios 3.0.6. I've put
the same config files </FONT><BR><FONT size=2>> (services.cfg and
hosts.cfg)</FONT> <BR><FONT size=2>></FONT> <BR><FONT size=2>> on the this
new system. But now the hosts all show as "Pending". So I </FONT><BR><FONT
size=2>> then moved the ssh check from a service check to a host check and
can </FONT><BR><FONT size=2>> see that the more hosts I move the less
hosts are pending. That's good so far...</FONT> <BR><FONT size=2>></FONT>
<BR><FONT size=2>> But, when I run the pre-flight check
(/usr/local/nagios/bin/nagios -v </FONT><BR><FONT size=2>> nagios.cfg), I now
get warnings to say some hosts don't have any </FONT><BR><FONT size=2>>
service checks associated with it!</FONT> <BR><FONT size=2>></FONT> <BR><FONT
size=2>> This is true as some nodes will only have ssh checks against them
</FONT><BR><FONT size=2>> whilst others will have other checks against them.
I'd rather it </FONT><BR><FONT size=2>> didn't warn me as I have
hundreds</FONT> <BR><FONT size=2>></FONT> <BR><FONT size=2>> of hosts
appear in the pre-flight check warnings and it now looks </FONT><BR><FONT
size=2>> incredibly untidy to see all this.</FONT> <BR><FONT
size=2>></FONT> <BR><FONT size=2>> How can I get rid of these warnings
?</FONT> <BR><FONT size=2>></FONT> <BR><FONT size=2>> I'm probably missing
something here so any help would be appreciated. </FONT><BR><FONT size=2>>
I'm wondering for example, if I should force the initial state to be
</FONT><BR><FONT size=2>> UP for hosts rather than</FONT> <BR><FONT
size=2>></FONT> <BR><FONT size=2>> moving the ssh service check to a host
check. But then what would </FONT><BR><FONT size=2>> happen if the service
check found a node was down - would it reflect </FONT><BR><FONT size=2>> that
in the "host problems" ?</FONT> <BR><FONT size=2>></FONT> <BR><FONT
size=2>> regards,</FONT> <BR><FONT size=2>> deborah</FONT> <BR><FONT
size=2>></FONT> <BR><FONT size=2>>
**********************************************************************</FONT>
<BR><FONT size=2>> ***** This email and any files transmitted with it are
confidential </FONT><BR><FONT size=2>> and intended solely for the use of the
individual or entity to whom </FONT><BR><FONT size=2>> they are
addressed.</FONT> <BR><FONT size=2>></FONT> <BR><FONT size=2>> Any
unauthorised distribution or copying is strictly prohibited.</FONT> <BR><FONT
size=2>> Whilst Kognitio Limited takes steps to prevent the transmission of
</FONT><BR><FONT size=2>> viruses via e-mail, we can not guarantee that any
email or attachment </FONT><BR><FONT size=2>> is free from computer viruses
and you are strongly advised to </FONT><BR><FONT size=2>> undertake your own
anti-virus precautions.</FONT> <BR><FONT size=2>></FONT> <BR><FONT
size=2>> Kognitio grants no warranties regarding performance, use or quality
of </FONT><BR><FONT size=2>> any e-mail or attachment and undertakes no
liability for loss or </FONT><BR><FONT size=2>> damage, howsoever
caused.</FONT> <BR><FONT size=2>></FONT> <BR><FONT size=2>> Kognitio
Limited, a company registered in England and Wales. </FONT><BR><FONT size=2>>
Registered number 0212 7833. Registered Office: 3a Waterside Park,
</FONT><BR><FONT size=2>> Cookham Road, Bracknell, Berks, RG12 1RB. VAT
number 864 4378 92.</FONT> <BR><FONT size=2>></FONT> <BR><FONT size=2>>
Kognitio Inc, a company incorporated in Delaware, principal office 180
</FONT><BR><FONT size=2>> North Stetson, Suite 3500, Chicago, IL 60601,
USA</FONT> <BR><FONT size=2>>
**********************************************************************</FONT>
<BR><FONT size=2>> *****</FONT> <BR><FONT size=2>></FONT> <BR><FONT
size=2>>
----------------------------------------------------------------------</FONT>
<BR><FONT size=2>> -------- Apps built with the Adobe(R) Flex(R) framework
and Flex </FONT><BR><FONT size=2>> Builder(TM) are powering Web 2.0 with
engaging, cross-platform </FONT><BR><FONT size=2>> capabilities. Quickly and
easily build your RIAs with Flex Builder, </FONT><BR><FONT size=2>> the
Eclipse(TM)based development software that enables intelligent </FONT><BR><FONT
size=2>> coding and step-through debugging.</FONT> <BR><FONT size=2>>
Download the free 60 day trial. <A href="http://p.sf.net/sfu/www-adobe-com"
target=_blank>http://p.sf.net/sfu/www-adobe-com</A> </FONT><BR><FONT size=2>>
_______________________________________________</FONT> <BR><FONT size=2>>
Nagios-users mailing list</FONT> <BR><FONT size=2>>
Nagios-users@lists.sourceforge.net</FONT> <BR><FONT size=2>> <A
href="https://lists.sourceforge.net/lists/listinfo/nagios-users"
target=_blank>https://lists.sourceforge.net/lists/listinfo/nagios-users</A></FONT>
<BR><FONT size=2>> ::: Please include Nagios version, plugin version (-v) and
OS when </FONT><BR><FONT size=2>> reporting any issue.</FONT> <BR><FONT
size=2>> ::: Messages without supporting info will risk being sent to
/dev/null</FONT> <BR><FONT size=2>></FONT> </P><BR><BR>
<P><FONT size=2>--</FONT> <BR><FONT size=2>Richard Quintin, DBA</FONT> <BR><FONT
size=2>Database & Application Administration</FONT> <BR><FONT
size=2>Virginia Tech</FONT>
</P><BR>***************************************************************************<BR>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. <BR><BR>Any
unauthorised distribution or copying is strictly prohibited. <BR>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.
<BR><BR>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. <BR><BR>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.<BR><BR>Kognitio Inc, a company incorporated in Delaware, principal office
180 North Stetson, Suite 3500, Chicago, IL 60601,
USA<BR>***************************************************************************<BR>
<BR>
***************************************************************************<BR>
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. <BR>
<BR>
Any unauthorised distribution or copying is strictly prohibited. <BR>
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. <BR>
<BR>
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. <BR>
<BR>
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.<BR>
<BR>
Kognitio Inc, a company incorporated in Delaware, principal office 180 North Stetson, Suite 3500, Chicago, IL 60601, USA<BR>
***************************************************************************<BR>
</BODY></HTML>