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
disable notification automatically after some hours
-
varalakshmi
- Posts: 13
- Joined: Wed Aug 06, 2014 8:01 am
Re: disable notification automatically after some hours
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).
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).
Eric Loyd • http://everwatch.global • 844.240.EVER • @EricLoyd
I'm a Nagios Fanatic! • Join our public Nagios Discord Server!
Re: disable notification automatically after some hours
varalakshmi, did eloyd's post clear things up for you?
Former Nagios employee