Page 1 of 1
Send email notification for every 60 minutes
Posted: Thu Sep 28, 2017 5:25 am
by bsivavani
Hi,
We would like send email notification from Nagios for every 60 min for OK state alert.
We tried it by setting Notification Interval option to 60 min, but it is not sending email.
Kindly advice.
Re: Send email notification for every 60 minutes
Posted: Thu Sep 28, 2017 10:32 am
by scottwilkerson
There is no option for re-notification of OK state on any of the checks in nagios. the notification interval is for re-notification on non-Ok states.
Re: Send email notification for every 60 minutes
Posted: Thu Sep 28, 2017 1:09 pm
by mcapra
Though requests for similar functionality in Core have been made on GitHub:
https://github.com/NagiosEnterprises/na ... issues/428
Re: Send email notification for every 60 minutes
Posted: Thu Sep 28, 2017 1:46 pm
by scottwilkerson
If this was the case and you wanted to send one hourly notification, you could use a plugin like this, setup a service to check every minute and max_check_attempts to 1
Code: Select all
#!/bin/bash
if [ $(date +"%M") -lt 1 ];then
echo "CRITICAL: Sent Notification";
exit 2
else
echo "OK: No Notification";
fi
This checks if the time on the server in the first minute of the hour and is critical if it is, otherwise it is OK.