-
Change Request
-
Resolution: Unresolved
-
Low
-
None
-
5.0.9, 5.2.5, 5.4.0alpha2
The OpsGenie webhook should send an Alert Close action when an Event is in the recovery status.
Inside the 'Event Update' block in the template, I've included the following javascript, which performs this action to my requirements. It's provided as a suggestion on what should be done:
if((params.event_source == 0 && params.event_value == 0 && params.event_update_status == 0) || (params.event_source == 3 && params.event_value == 1)) { resp = Media.request('post', params.event_id + '/close?identifierType=alias', fields); if (typeof resp.response !== 'object' || typeof resp.response.result === 'undefined') { throw 'Cannot update ' + Media.name + ' issue. Check debug log for more information.'; } if (resp.status === 202) { resp = Media.getAlertId(resp.response.requestId); } else { throw Media.name + ' response code is unexpected. Check debug log for more information.'; } }
- depends on
-
ZBX-20392 Opsgenie intergration is broken for problem closing
- Closed