ansible / awx

AWX provides a web-based user interface, REST API, and task engine built on top of Ansible. It is one of the upstream projects for Red Hat Ansible Automation Platform.
Other
13.72k stars 3.38k forks source link

OpsGenie notification proposal #7227

Open dzinek opened 4 years ago

dzinek commented 4 years ago
ISSUE TYPE
SUMMARY

I am trying to find a way, how to integrate AWX notifications with OpsGenie using API. It can be done using https://docs.opsgenie.com/docs/alert-api, I have to only find a way how to create a payload.

But anyway if AWX has already PagerDuty notification type, it would be also nice to have the same with OpsGenie with a native notification type.

akovov commented 4 months ago

What help needed? maybe this minimalistic snippet will help. body would be: @{ message = "This is alert summary" description = "I guess it's clear what it means" priority = "P1 .. P5, where P1 kind of critical" } headers 'Headers' = @{ "Authorization" = "GenieKey <here goes token>" }

and you send all of that to 'https://api.eu.opsgenie.com/v2/alerts' .