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

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,463,466
Community Members
 
Community Events
176
Community Groups

How to set up Customer value to opsgenie priority from PRTG

Hello,

 

We are trying to set Customer values to Opsgenie priority from the PRTG integration by assigning our own mapped priority values. We are trying to map the priority PRTG is sending over to Opsgenie which comes in the form of stars (*) but can't seem to work out how to get this to map. 

This is an example of what we have attempted which hasn't worked.

priority: '{{ if eq .priority "*****"}}P1{{else if eq .priority "****"}}P2{{else if eq .priority "***"}}P3{{else if eq .priority "**"}}}}P4{{else}}P5{{end}}'

 

Have tried to find similar issues on your forums but haven't found a solution.

 

Many thanks

1 answer

0 votes
Darryl Lee Atlassian Team Apr 22, 2022

Hi @Isabel Grose ,

This is Darryl. I am here to help. 

Understand that you would like to set up the PRTG integration on your Opsgenie to auto-parse the custom priority levels from the asterisk symbol (*).

Unfortunately, this is not feasible in the current design.

According to our official document, the Priority values that Opsgenie accepts are only limited to this format: P1P2P3P4, or P5.

That said, using any other indicators will not be working.

Should you have any further inquiries, please feel free to contact Opsgenie Support and my colleague will help you from there.

Thanks.

Kind regards,
Darryl Lee
Support Engineer, Atlassian

Hi @Darryl Lee ,

 

thanks for getting back to me. 

You've mentioned this isn't feasible in the current design, is this something that might be considered for future changes? PRTG is one of the out of the box integrations associated with Opsgenie and it seems a shame not to have the features available to accommodate alerting prioritisation. 

 

Is there an alternative way to set up priority mapping against PRTG, one that doesn't require setting up each alert individually?

 

Many thanks

Like Darryl Lee likes this
Darryl Lee Atlassian Team Apr 25, 2022

Hi @Isabel Grose ,

Thanks for getting back to us.

I understand how this impacts the operation/integration as the asterisk format is the default format by PRTG.

I have created a feature request, OPSGENIE-428, please vote it and set yourself as a Watcher to receive the latest updates.


As for a workaround, if your Opsgenie subscription is at a Standard or Enterprise, you may follow the concepts below to resolve this.

 

Alert Fields on Advanced Integration Settings

Reference Documentation ->

https://docs.opsgenie.com/docs/integrations-framework https://docs.opsgenie.com/docs/advanced-integration-settings https://docs.opsgenie.com/docs/filters https://docs.opsgenie.com/docs/draggable-fields https://docs.opsgenie.com/docs/priority-field

Under your integration configurations, while defining a “Create Alert” rule, you can set the priority field:

  • as P1, P2, P3, P4, P5,
  • as {{priority}},
  • or as Custom Value to Opsgenie Priority.

Screenshot 2022-04-25 at 17.10.33.png

The first option is simply assigning the set priority to the created alert.

The second option {{priority}}, can have two different outcomes.

  • If the integration sends a priority value and Opsgenie maps it with the known priority values that are P1, P2, P3, P4, or P5, an alert will be created with the sent priority value.

  • If the priority sent from the integration does not match with the known priority values (e.g. it is received as CRITICAL), automatically the alert will be generated with P3.

    The third option “Custom Value to Opsgenie Priority” is giving a chance for defining how you want to parse the priority from the payload. The parsed value again should be in the format of P1, P2, P3, P4, or P5.

Screenshot 2022-04-25 at 17.12.18.png

If either of these options does not work in case when the incoming data does not contain the values P1, P2, P3, P4, P5, you can create multiple Create Alert rules, one for each priority levels, as shown below.

Screenshot 2022-04-25 at 17.13.10.pngScreenshot 2022-04-25 at 17.13.37.png

Leveraging Alert Policy without any changes on the integration settings


Reference Documentation

-> https://docs.opsgenie.com/docs/team-policies#alert-policy

-> https://docs.opsgenie.com/docs/global-policies#alert-policy

There are 2 types of Alert Policy, Team-based and Global, here we take Team-based alert policy for example.
Let’s say we expect the alerts created by Icinga2 integration owned by Demo Team which has the string “Host is Down” in the Alert Message to be prioritised as P1-Critical.

On the Create Alert action rule in the Advanced integration page of the Icinga2, we can see the alerts created by this integration will have the field and value:
“Source”: “Icinga2”.

 Screenshot 2022-04-25 at 17.15.18.png

So then we can navigate to the Teams > Demo Team > Policies, click the button to “Add alert policy” and craft the alert policy like this:

  1. Toggle up “Enable policy when created”.

  2. Configure the conditions filter as

    “Match all conditions below”

    “Message” | ”Contains” | “Host is Down”

    “Source” | “Contains” | “Icinga2”

  3. Select the Priority as “P1-Critical”

Screenshot 2022-04-25 at 17.17.39.png

After saving it, that’s all!
With the above settings, we can ensure that only the alerts created by this Demo Team’s Icinga2 integration matching the conditions filter will be prioritized as P1-Critical.

Please note that all the settings on Opsgenie are case-sensitive.


Hope this helps.

Kind regards,
Darryl Lee
Support Engineer, Atlassian

Like Isabel Grose likes this

Suggest an answer

Log in or Sign up to answer
TAGS

Atlassian Community Events