Page 1 of 1
disable notification automatically after some hours
Posted: Mon Aug 18, 2014 1:59 am
by varalakshmi
Hi
I would like disable notification automatically if the host or service is down or critical for more than 8 hours
Please some one help me to run the command in cronjob
Thanks
Varalakshmi
Re: disable notification automatically after some hours
Posted: Mon Aug 18, 2014 7:58 am
by eloyd
Rather than complicating things with a cron job, why not just set the total number of notifications to be the number you want by using escalations?
Set the "notification_interval" to zero, which means Nagios will only send out one notification for the service. Then use escalations to only send notifications until 8 hours has passed.
You can find information about escalations at
http://nagios.sourceforge.net/docs/3_0/escalations.html.
If you really want to go with the cron job, you need to use the Nagios API, documented here:
http://old.nagios.org/developerinfo/ext ... ndlist.php. You are looking for
http://old.nagios.org/developerinfo/ext ... mmand_id=6 and
http://old.nagios.org/developerinfo/ext ... mmand_id=5 (DIASBLE_SVC_CHECK and ENABLE_SVC_CHECK).
Re: disable notification automatically after some hours
Posted: Mon Aug 25, 2014 9:16 am
by tmcdonald
varalakshmi, did eloyd's post clear things up for you?