How to stop monitoring service when host is down

Yo guys i’m new in nagios, so plz help me out. Basically set up all the services, host and etc. All are running fine.

I’ve been trying to configure the nagios to stop monitoring a host services when that host is down. Is this possible been trying all day and looking for related materials but cant find an results.

So plz help this lost soul. Cheers for this wonderful program. :stuck_out_tongue:

try reading about service dependencies. =)

Problem is that service dependencies require:
-dependent_host_name
-dependent_service_description
-host_name
-service_description

However my service doesnt depend on any other service for it to work. But for service dependency to work it requires dependent_service_description so how?

Also i want to monitor (if host is down, dont monitor current host services). But service dependency works in a way that, (if host 1 service is down, dont monitor host 2 service).
Edited Wed Jul 06 2005, 08:00PM ]

Can anyone help me plz!!!

If a host is going to be down for a prolonged period of time, then remove the host and service checks from all the cfg files, or disable the checks of this service and the host by using the links provided in the cgi’s.

I do this periodically, and also I submit a “passive” check for the services and give them an OK state and a check output of “down till xmas” or something. That way, they don’t clutter up the “service problems” display.

If you want this to be automatic, you might want to recall that nagios is a monitoring tool. If a service or host check is failing, there is no way that nagios could have the smarts to know “Hey, since this failed, I’m never going to check this darn thing again”. It makes no sense, since that is precisely what you DONT want nagios ever to do. And if for some reason you do, then manually tell nagios to “STOP” by using the .cgis “Disable checks of this service”

Maybe my point was not clear. Hmmm. Let me try to explain again.

What i meant was when the host is down, Nagios will stop monitoring the service (eg. ftp, http, etc) on that current host. However nagios will still continue to monitor the host that is down. But when the host recovers to a up status, Nagios will automatically resume to monitor the services on that host. Cause it makes no sense to monitor a service on a host that is down, get my point.

nagios.sourceforge.net/docs/1_0/ … uling.html

I understand that what you would like to see happen, is that only the host check is performed every 5 minutes, and if it finally comes alive, to then check the services. But nagios does not schedule host checks, only service checks. This host check that is made, is done so you wont be bombarded with 20 emails, saying that service1-20 are down, but in fact, the problem is that the host is down, causing all 20 services to be down. 1 email is sent.

Perhaps in version 2.0 we will see host checks being scheduled and working the way you suggest. Your logic makes perfect sense, but I’m just saying that this is not how it works and we can’t force it to work the way you suggest.

Ic. Thanks anyway for helping me. :stuck_out_tongue: