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.
Send email notification for every 60 minutes
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Send email notification for every 60 minutes
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
Though requests for similar functionality in Core have been made on GitHub:
https://github.com/NagiosEnterprises/na ... issues/428
https://github.com/NagiosEnterprises/na ... issues/428
Former Nagios employee
https://www.mcapra.com/
https://www.mcapra.com/
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Send email notification for every 60 minutes
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
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.
Code: Select all
#!/bin/bash
if [ $(date +"%M") -lt 1 ];then
echo "CRITICAL: Sent Notification";
exit 2
else
echo "OK: No Notification";
fi