Nagios XI Downtime Schedule

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
jkinning
Posts: 747
Joined: Wed Oct 09, 2013 2:54 pm

Nagios XI Downtime Schedule

Post 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.
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Nagios XI Downtime Schedule

Post 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.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked