Page 1 of 1

Manually making a host down

Posted: Thu Mar 03, 2011 6:13 pm
by Box293
I have an issue that relates to how one of our engineers works on his server. Whenever he does "stuff" he runs a script that disables all services including NSclient. However the host still responds to pings so in Nagios the host is still "up".

This is annoying because even with a scheduled downtime defined for the host, because the host isn't "down" the scheduled downtime does not apply to it's child services.

Another example is if someone is going to work on a server for the next two days. It might not be down but we don't want to be worried about CPU usage going high etc. How can I affectively say "ignore this host and it's child services for the next x hours". We are still interested in continuing the checks and gathering performance data on services, we just don't want to be notified if services trigger warning and critical values (we just want them to appear like "xx Schedueld" on the tactical overview).

Is there any way to mark a host as down and it stays down with it's child services until the scheduled downtime period finishes?

Nagios XI 2009R1.4B running on a VMware VM on an ESXi 4.1 host.

Re: Manually making a host down

Posted: Fri Mar 04, 2011 11:23 am
by mguthrie
If you access the Host details->Advanced(tab)->See this host in Nagios core, you'll see an action command to "Schedule downtime for all services on this host." Why this doesn't happen automatically when you schedule host downtime, I'm not entirely sure, but hopefully that gets you what you need for now.

Re: Manually making a host down

Posted: Fri Mar 04, 2011 5:20 pm
by Box293
Thanks for that, this is exactly what I am after.

Re: Manually making a host down

Posted: Mon Mar 07, 2011 12:17 pm
by mguthrie
Good deal!

Re: Manually making a host down

Posted: Mon Jul 18, 2011 6:22 am
by nwieland
I have the same problem as the OP, is it intended that services will only get marked down if either set explicitely after scheduling downtime, as Mike has described? Notifications are surpressed for the services, but it seems that the checks (and subsequently potential event handlers) are executed anyway, which for me is unexpected (and, personally, undesired) behaviour.

Re: Manually making a host down

Posted: Mon Jul 18, 2011 12:05 pm
by mguthrie
Do you have custom event handlers defined other than the xi_host_event_handler and xi_service_event_handler? With the default event handlers, the checks will continue, but notifications are supposed to be suppressed.

Re: Manually making a host down

Posted: Tue Jul 19, 2011 1:09 am
by nwieland
I'm actually happy with the notifications supressed, but I'd like to see service checks supressed too if a host is under maintenance :)

yes, I have a custom event handler (defined as a command), which is a shell script that will, after reaching a certain number of soft/hard events for a particular service, run check_npre to trigger execution of a .bat file on the windows host that caused the event to kill and restart a particular service (and send an email about the restart attempt). This all works fine, but if we put a host under scheduled downtime, we usually don't want nagios to try and restart services that we might have intentionally put down. And if we're doing bulk downtime (ie for a host group), it's a bit tedious to then have to manually click "Schedule downtime for all services on this host" for all hosts in question.

Re: Manually making a host down

Posted: Tue Jul 19, 2011 9:26 am
by mguthrie

Re: Manually making a host down

Posted: Wed Jul 20, 2011 1:46 am
by nwieland
mguthrie wrote:Ah, we made a tool for this : )
http://exchange.nagios.org/directory/Ad ... nt/details
Oh :) very nice and useful, thanks!

Re: Manually making a host down

Posted: Wed Jul 20, 2011 9:13 am
by nscott
Awesome, good to see thats getting some use. :D