Hi there
I have built some watchers that fire off to our Pager Duty service, below is an example of a watcher. The alert triggers and works perfectly, however, the issue I am having is that the alert doesn't auto resolve when the threshold is back to normal, I will have to go into pager duty and manually resolve the alert.
I am guessing that I will need to add some sort of 'condition' to my watcher so that it knows when to resolve the alert, but I am not sure how to achieve this, any ideas of what it would look like? Or maybe there a better way of doing this?
"actions" : {
"pagerduty": {
"webhook": {
"scheme": "https",
"method": "POST",
"host": "events.pagerduty.com",
"port": 443,
"path": "/generic/2010-04-15/create_event.json",
"body": "{\"service_key\": \"MyServiceKey\",\"incident_key\": \"MyIncidentKey\",\"event_type\": \"trigger\",\"description\": \"Test\",\"details\":{\"alert_source\":\"watcher\",\"description\":\"Test Alert\",\"LogMessage\":\"Something has gone wrong\"}}",
"headers": {"Content-type": "application/json"}
}
}
}
}