add to /etc/cron.d/
command:
change_delay.sh extend
change_delay.sh reset
Example script using the old command-line API:
Necessary API calls using the NEW web services API:
Set the notification delay to 15 minutes for default host and services template:
curl -k -X PATCH -H 'content-type: application/json' -d '{"first_notification_delay": "15"}' -u 'user:password' https://monitor.host/api/config/host_template/default-host-templatecurl -k -X PATCH -H 'content-type: application/json' -d '{"first_notification_delay": "15"}' -u 'user:password' https://monitor.host/api/config/service_template/default-service
Set the notification delay back to nothing:
curl -k -X PATCH -H 'content-type: application/json' -d '{"first_notification_delay": "0"}' -u 'user:password' https://monitor.host/api/config/host_template/default-host-templatecurl -k -X PATCH -H 'content-type: application/json' -d '{"first_notification_delay": "0"}' -u 'user:password' https://monitor.host/api/config/service_template/default-service
Get a list of done changes and commit these:
curl -k -X GET -u 'user:password' https://monitor.host/api/config/changecurl -k -X POST -u 'user:password' https://monitor.host/api/config/change
-
Tags:
- notifications
- alerting
- alerts
- delay
Comments
0 comments
Please sign in to leave a comment.