Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Deleted user
0 / 0 points
Next:
badges earned

Your Points Tracker
Challenges
Leaderboard
  • Global
  • Feed

Badge for your thoughts?

You're enrolled in our new beta rewards program. Join our group to get the inside scoop and share your feedback.

Join group
Recognition
Give the gift of kudos
You have 0 kudos available to give
Who do you want to recognize?
Why do you want to recognize them?
Kudos
Great job appreciating your peers!
Check back soon to give more kudos.

Past Kudos Given
No kudos given
You haven't given any kudos yet. Share the love above and you'll see it here.

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Triaging Data Dog integration monitors Edited

I recently integrated DataDog with OpsGenie to receive alerts when a monitor is triggered in the DataDog environment. The integration itself works perfectly, but I am having trouble with translating the levels of priority into the OpsGenie environment. For example, I might have a monitor for AWS server tracking CPU utilization where I have 2 thresholds, one for warning and one for alert. Currently, I am only able to receive alerts with the default "P3" priority level. Is ops genie able to differentiate between a warning and alert trigger from DataDog and assign different P1, P2, P3, P4, P5 priority levels?Capture.PNGCapture2.PNG

2 answers

0 votes
Robert Atlassian Team Sep 02, 2020

Hi @Kevin Tsai !

 

For this, we'll utilize the advanced menu of the Datadog integration. Since Datadog uses a different priority scheme than Opsgenie, we need to do this mapping manually using a setup like this:

 

image.png

 

Once you set up the mapping for the first Datadog priority, you can click the cog icon to create a duplicate action. This should make setting up the remaining mappings a lot easier too.

 

Here's a link to the advanced integration settings documentation in case you want some more background: https://docs.opsgenie.com/docs/advanced-integration-settings

 

Hope this helps!

This answer covers where to put the rules in place, but I'd note that the pictured mapping won't work for Datadog in particular. (This may have changed since you wrote it!) For some reason, Datadog's priority json field, which OpsGenie picks up as {{priority}}, is not actually the P1-P5 value but an unrelated value of "normal" or "low".

The real priority doesn't have its own field, so getting it requires using {{message_title.substring(1,3)}}. The upside of this is that you can define a single Custom Value process instead of having to check for each word in a different mapping.

As of March 2021, Robert's answer is correct in flow, but the specific fix suggested by the picture doesn't work.

Datadog's {{priority}} field is not the P1-P5 metric but a separate field with values {"normal", "low"}. The PN field is exposed as $ALERT_PRIORITY in webhooks, but is not a named field at all in the Datadog - OpsGenie integration. (You can see accurate samples of the DD Json output here: https://docs.opsgenie.com/docs/datadog-integration.) Instead, Datadog puts the PN value at the start of the message title (e.g. "[P4] [Warn] test alert".

The good news is that this frees you from needing a flow per priority. Instead conditioning on priority, you should use a single flow with Priority set to "Custom Value to Opsgenie Priority" as described here: https://docs.opsgenie.com/docs/priority-field. Then, set the Mapped Priority Value to {{message_title.substring(1,3)}}.

Depending on what you want to do, "Warn" vs "Alert" can be handled the same way - they're the next bracketed entry in the title. If you specifically want to alter OpsGenie priority based on that state, you could define multiple flows matching different message_titles. I don't see a way to do computations like "if warn, then priority - 1" here, but you could map e.g. P1 & P2 warns to P3 priority.

However, I'd suggest leaving priority as-is, to mirror Datadog's configuration, and then using custom alerting & notification policies for your desired behavior. For example, you can set warnings to use a slower escalation policy than alerts, or delay low-priority warnings until on-hours.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
TAGS
Community showcase
Published in Opsgenie

New GitLab integration in Incident Investigation view

We launched the first version of the Incident investigation view in April of 2020 for Bitbucket Pipelines. Shortly after that, we added the ability to investigate deployment-related incidents in Opsg...

325 views 0 4
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you