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

Next challenges

Recent achievements

  • Global
  • Personal


  • Give kudos
  • Received
  • Given


  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

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

Alert notification template for alertmanager(prometheus) to send to opsgenie Edited

Can any one share a sample template for alerts to be sent from alert manager to opsgenie.



Opsgenie template :


{{ define "ops_summary" }}

Environment: {{ .Alert.Labels.env}}

{{ end }}


I am unable to capture the value of this label and pass it as details tab to opsgenies extra properties. In alert at opsgenie it shows as {{ template "ops_summary" . }}



  - send_resolved: true

    details: { '{{ template "ops_summary" . }}' }


    - name: 'test

      type: 'team'

2 answers

1 vote
Nick H Atlassian Team Dec 18, 2020

Hi @Sumit Yadav ,

A few samples/examples of Alertmanager << >> Opsgenie notification templates can be reviewed here in this other community post:

Hope this helps! Let us know if you have any additional questions.

Hi @Nick H I used the logic mentioned however I would want to know how to capture single label/annotations value in template. This is a bit confusing.

Nick H Atlassian Team Dec 24, 2020

I'm not an Alertmanager expert - nor have an instance myself to test - so I'm not entirely sure how to capture single label/annotations value in template. This is something you may want to reach out to Prometheus support for.

But - within the Opsgenie-Prometheus integration, you should be able to extract a single label/annotations value using either string processing or regex:

Hi @Sumit Yadav

If you go in Atlassian | Start page you will find it here

hi @Ian Scrivens I have updated with sample template I created still facing the issue.

Suggest an answer

Log in or Sign up to answer
Community showcase
Published in Opsgenie

Investigate deployment-related incidents with Bamboo and Opsgenie together

Back in April of last year one of the major product announcements from Opsgenie was the launch of the Incident investigation view which created a deep connection between Bitbucket and Opsgenie, empow...

149 views 1 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