<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Using check_dummy with a service check titled "No Services" is exactly how we are doing this here. We have a number of hosts which we are really only interested in if the machine is running or not - so check_icmp is specified as the host check, and "No services" as the only service check. You are right, however, in that all these "No Services" show up in the service status list. If you don't want that, about the only way I can think of is to not associate any services with the host, and simply ignore the warnings you get about that when running nagios -v. This does cause some display issues, however (hosts without services tend to not show up in various screens) - thus the reason I opted to add the "No services" service.<br><div> <span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; -webkit-text-decorations-in-effect: none; text-indent: 0px; -webkit-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; -webkit-text-decorations-in-effect: none; text-indent: 0px; -webkit-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><span class="Apple-style-span" style="border-collapse: separate; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; -webkit-text-decorations-in-effect: none; text-indent: 0px; -webkit-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><div>-----------------------------------------------</div><div>Israel Brewster</div><div>Computer Support Technician II</div><div>Frontier Flying Service Inc.</div><div>5245 Airport Industrial Rd</div><div>Fairbanks, AK 99709</div><div>(907) 450-7250 x293</div><div>-----------------------------------------------</div><br class="Apple-interchange-newline"></span></span></div></span></div></span><br class="Apple-interchange-newline"> </div><br><div><div>On Mar 16, 2009, at 9:34 AM, Deborah Martin wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"> <div> <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 [<a href="mailto:Deborah.Martin@Kognitio.com">mailto:Deborah.Martin@Kognitio.com</a>] <br><b>Sent:</b> 16 March 2009 15:34<br><b>To:</b> 'Richard Quintin'<br><b>Cc:</b> <a href="mailto:nagios-users@lists.sourceforge.net">nagios-users@lists.sourceforge.net</a><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: <a href="mailto:nagios-users@lists.sourceforge.net">nagios-users@lists.sourceforge.net</a></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 <<a href="mailto:Deborah.Martin@kognitio.com">Deborah.Martin@kognitio.com</a>> 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">> <a href="mailto:Nagios-users@lists.sourceforge.net">Nagios-users@lists.sourceforge.net</a></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> </div> ------------------------------------------------------------------------------<br>Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are<br>powering Web 2.0 with engaging, cross-platform capabilities. Quickly and<br>easily build your RIAs with Flex Builder, the Eclipse(TM)based development<br>software that enables intelligent coding and step-through debugging.<br>Download the free 60 day trial. <a href="http://p.sf.net/sfu/www-adobe-com_______________________________________________">http://p.sf.net/sfu/www-adobe-com_______________________________________________</a><br>Nagios-users mailing list<br><a href="mailto:Nagios-users@lists.sourceforge.net">Nagios-users@lists.sourceforge.net</a><br>https://lists.sourceforge.net/lists/listinfo/nagios-users<br>::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. <br>::: Messages without supporting info will risk being sent to /dev/null</blockquote></div><br></body></html>