Hi Team,
We're trying to integrate our Prometheus Alertmanager with Opsgenie in Jira.
Can you please help how to get the additional fields like Description, environment and Summary be visible in the alert?
receivers:
- name: default
email_configs:
- to: '{{ .GroupLabels.support_contacts }}'
send_resolved: true
- name: opsgenie_receiver
opsgenie_configs:
- api_key: <api_key>
send_resolved: true
description: '{{ .CommonAnnotations.description }}'
details:
alertname: '{{ .GroupLabels.alertname }}'
instance: '{{ .GroupLabels.instance }}'
severity: '{{ .CommonLabels.severity }}'
priority: '{{ if eq .CommonLabels.severity "critical" }}P1{{ else }}P3{{ end }}'
custom_fields:
summary: '{{ .CommonAnnotations.summary }}'
env: '{{ .GroupLabels.env }}'
support_contacts: '{{ .GroupLabels.support_contacts }}'
time_intervals:
- name: weekdays
time_intervals:
- weekdays: ['monday:friday']
times:
- start_time: '08:00'
end_time: '24:00'
For example, we have the following Alertmanager rule set up.
- alert: WindowsServerCpuUsage
expr: 100 - (avg by (instance) (rate(windows_cpu_time_total{mode="idle"}[2m])) * 100) > 90
for: 0m
labels:
severity: warning
team: infra
annotations:
summary: "Windows Server CPU Usage (instance {{ $labels.instance }})"
description: |
CPU Usage is more than 80%
VALUE = {{ $value }}
LABELS = {{ $labels }}
We receive the alerts and get them populated into Jira using Opsgenie in the following format as shown below.
[Prometheus]: [FIRING:1] <server> (WindowsServerCpuUsage warning infra)
Description
Windows Server CPU Usage (instance <server>)
The extra properties only contain the following values.
Extra properties
severity warning
instance <server>
alertname
team infra
Can you please advise if the additional fields (such as Description, environment and Summary) need to be also configured in Administration part of the UI and how to get them populated under the "Extra properties" section?
Thanks,
Eugene