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.
Manually making a host down
- Box293
- Too Basu
- Posts: 5126
- Joined: Sun Feb 07, 2010 10:55 pm
- Location: Deniliquin, Australia
- Contact:
Manually making a host down
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Re: Manually making a host down
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.
- Box293
- Too Basu
- Posts: 5126
- Joined: Sun Feb 07, 2010 10:55 pm
- Location: Deniliquin, Australia
- Contact:
Re: Manually making a host down
Thanks for that, this is exactly what I am after.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Re: Manually making a host down
Good deal!
Re: Manually making a host down
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.
You do not have the required permissions to view the files attached to this post.
Re: Manually making a host down
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
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.
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
Ah, we made a tool for this : )
http://exchange.nagios.org/directory/Ad ... nt/details
http://exchange.nagios.org/directory/Ad ... nt/details
Re: Manually making a host down
Ohmguthrie wrote:Ah, we made a tool for this : )
http://exchange.nagios.org/directory/Ad ... nt/details
Re: Manually making a host down
Awesome, good to see thats getting some use. 
Nicholas Scott
Former Nagios employee
Former Nagios employee