Page 1 of 1

Nagios XI Downtime Schedule

Posted: Fri Jun 12, 2015 2:47 pm
by jkinning
Is there a way to have Nagios disable notification for everything on a schedule and specify the times to disable the notifications? I see where I can disable Host and Services but I am looking to do this across the board for a couple of hours. I can click the Enabled on the Notifications tab from the Tactical Overview but thought it would be nice if I could schedule this.

Re: Nagios XI Downtime Schedule

Posted: Mon Jun 15, 2015 8:44 am
by lmiltchev
If you don't want to be notified for a couple of hours every day, you could create a custom time period, perhaps something like this:

Code: Select all

define timeperiod {
	timeperiod_name               		custom_timeperiod
	alias                         		2 hours off every day
	sunday                        		00:00-09:00,11:00-24:00
	monday                        		00:00-09:00,11:00-24:00
	tuesday                       		00:00-09:00,11:00-24:00
	wednesday                     		00:00-09:00,11:00-24:00
	thursday                      		00:00-09:00,11:00-24:00
	friday                        		00:00-09:00,11:00-24:00
	saturday                      		00:00-09:00,11:00-24:00
	}
and apply it as a "Notification period" to all of your hosts/services. This can be done easily in bulk via the "Bulk Modifications Tool" in Nagios XI Enterprise edition.

Another way of achieving the same goal would be to run a cron job to disable/enable notifications globally for a couple of hours. Maybe you can add something like this to the crontab:

Code: Select all

00 09 * * * /bin/sed 's/enable_notifications=1/enable_notifications=0/' /usr/local/nagios/etc/nagios.cfg; service nagios restart
00 11 * * * /bin/sed 's/enable_notifications=0/enable_notifications=1/' /usr/local/nagios/etc/nagios.cfg; service nagios restart
Hope this helps.