The opsgenie integration docs ( https://support.atlassian.com/opsgenie/docs/integrate-opsgenie-with-sumo-logic/ ) are woefully out of date with the sumologic ones (https://help.sumologic.com/Manage/Connections-and-Integrations/Webhook-Connections/Set_Up_Webhook_Connections#Webhook_payload_variables)
I want to send things like `alertResponseUrl` and define what the alert message should be, but opsgenie doesn't allow that and ignores json fields that aren't in their deprecated list.
Have other folks had success configuring sumologic alerts to be better?
Hi Nat!
Justin here, from Opsgenie support - happy to help!
While the expected payload from Sumo Logic is preset (meaning that any automatic mapping of fields in the payload to the drag and drop dynamic fields in the alert fields configuration is not able to be modified), you can send additional data from Sumo Logic's webhook and extract it on the Opsgenie side of things (to be added to alert fields, like the alert message).
The documentation that addresses how to do this can be found here:
In the case of the Sumo Logic integration, we would be extracting this data from the payload - and we can access the payload object in Opsgenie using the {{_payload}} syntax. For an example - let's say I wanted to send the 'alertResponseUrl' from Sumo Logic to Opsgenie - I could configure the webhook body in Sumo Logic like this:
{
"searchName": "{{SearchName}}",
"searchDescription": "{{SearchDescription}}",
"searchQuery": "{{SearchQuery}}",
"searchQueryUrl": "{{SearchQueryUrl}}",
"timeRange": "{{TimeRange}}",
"fireTime": "{{FireTime}}",
"rawResultsJson": "{{RawResultsJson}}",
"numRawResults": "{{NumRawResults}}",
"priority" : "P3",
"aggregateResultsJson" : "{{AggregateResultsJson}}",
"alertResponseUrl": "{{alertResponseUrl}}"
}
And then within the Advanced integration settings in Opsgenie, extract that 'alertResponseUrl' value out with this:
{{_payload.alertResponseUrl}}
In practice, if I wanted to append that url value to the alert message field, it would look like this:
So, with this, you should be able to get any data that exists within Sumo Logic sent over to Opsgenie and mapped out to a target alert field.
Let me know if that helps get what you need, or if you have any other questions.
Thanks!
Justin S
Atlassian Cloud Support
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.