Page 1 of 1

Don't Want HOST Check done for a machine

Posted: Wed Apr 02, 2014 10:16 am
by itIsMrKevin
Hi,

We are using Nagios Core version 3.2.3. I recently added serverA to be checked by Nagios by both SSH and HTTP service checks.

We sometimes will get an email from Nagios with the following Subject:
** PROBLEM Host Alert: serverA is DOWN **


NOTE; We only want to monitor serverA via the SSH and HTTP tests and not by the Host check.
I believe the above test is the Host test and not a service test. If that is true, I am not sure why we are getting those messages because I clicked on "Disable active checks of this host".

Re: Don't Want HOST Check done for a machine

Posted: Wed Apr 02, 2014 11:02 am
by itIsMrKevin
Sorry for the doublepost but I had some additional questions to ask.

I think I may also need to check "Disable notifications for this host" which I believe will only disable the "host check" notifictions and not the "service check" notifications for serverA.

I shutdown serverA as a test about 35 minutes ago. We also immediately got the email from Nagios stating the host was down, but we still have not gotten any emails stating that the HTTP Service and SSH Service were down. I then looked in the Nagios GUI and it showed the following for
Service Status Last Check Duration Attempt Status Information
HTTP Test CRITICAL 04-02-2014 11:44:41 0d 0h 8m 44s 1/3 No route to host

SSH Service CRITICAL 04-02-2014 11:51:58 0d 0h 1m 27s 1/3 No route to host



My qeustions are;
1) Why have we not received any emails from Nagios that the HTTP Service test and the SSH Service test failed? Is this because I have the server shutdown and these tests will only work if the server is up but that particular service is down?

Any help would be appreciated.

Re: Don't Want HOST Check done for a machine

Posted: Wed Apr 02, 2014 12:37 pm
by abrist
itIsMrKevin wrote:Why have we not received any emails from Nagios that the HTTP Service test and the SSH Service test failed?
Because the host is down. Nagios will suppress srvice notifications if the host itself is down.
FYI: You could use a different check for the host (instead of ping, host-alive or icmp), try configuring an ssh or http check to see if the host is up and set that chack as your host check.

Re: Don't Want HOST Check done for a machine

Posted: Wed Apr 02, 2014 12:43 pm
by itIsMrKevin
Hi abrist,

Thank you for that info. Below are a few follow-up questions I was hoping you might be able to answer:

1) Can I set ssh to be the host check just for serverA while ping is the host check for all ofher machines? If so, do you have a link to any documentation for how to do this?

2) Where is the host_check test specified (i.e. whether it is ping, ssh, etc..)? I looked in our main Nagios configuration file (/usr/local/nagios/etc/nagios.cfg) and saw values such as "max_host_check_spread=" but I did not see any value that specified that the host_check would use ping to check with.

Thanks again.

Re: Don't Want HOST Check done for a machine

Posted: Wed Apr 02, 2014 4:18 pm
by tmcdonald
itIsMrKevin wrote:1) Can I set ssh to be the host check just for serverA while ping is the host check for all ofher machines? If so, do you have a link to any documentation for how to do this?
Are you asking how to do this in general? Or are you looking for a fast way to do this, like using templates or hostgroups?
itIsMrKevin wrote:2) Where is the host_check test specified (i.e. whether it is ping, ssh, etc..)? I looked in our main Nagios configuration file (/usr/local/nagios/etc/nagios.cfg) and saw values such as "max_host_check_spread=" but I did not see any value that specified that the host_check would use ping to check with.
That would be in the specific host config file itself, under /usr/local/nagios/etc/hosts/ by default. Look for the "check_command" entry.

Re: Don't Want HOST Check done for a machine

Posted: Fri Apr 04, 2014 9:57 am
by FTL
For hosts that i only want service checks and notifications on i just generally do a ping check so it has something to check and then just disable notifications for the host.

Re: Don't Want HOST Check done for a machine

Posted: Fri Apr 04, 2014 10:08 am
by tmcdonald
FTL wrote:For hosts that i only want service checks and notifications on i just generally do a ping check so it has something to check and then just disable notifications for the host.
Or just check_dummy 0 and be done with it ;)