Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

How to configure alert message for Sumologic to Opsgenie

Nat Welch
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
February 4, 2022

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?

1 answer

1 vote
Justin Sitarz
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
February 7, 2022

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:

 

https://support.atlassian.com/opsgenie/docs/dynamic-fields-in-opsgenie-integrations/#Using-Raw-Parameters-From-Webhook-Url--Payload-and-Headers

 

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:

 

Screen Shot 2022-02-07 at 9.18.53 AM.png

 

 

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

Cameron McAuley August 23, 2024

Hey Justin! Do you know if this supports parsing of sumologic's `ResultJson` field?

We can have payloads coming through from SumoLogic with a full Json array full of Json objects within that ResultJson field.

Any way of extracting info from within that into fields in Opsgenie?

If so, what happens if we have multiple objects within an array with the same field name?

 

e.g what if I wanted to get the `env` field out of this ResultsJson in my Sumologic payload?

[{"Timeslice":1724426340000,"avg":12.2584685,"env":"stage-env"},{"Timeslice":1234567894666,"avg":12.2584685,"env":"prod-env"},{"Timeslice":3566463246466,"avg":12.2584685,"env":"stage-env"}]

Rafael Meira
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
August 26, 2024

Hey @Cameron McAuley  my suggestion, since this is a very old question and suggestion given.

Is for you to create a support ticket with out support team here https://support.atlassian.com/contact/#/ 

Then we can get more informaiton from you in order to test and provide you with the proper answer.

 

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events