Thanks Sally for the reply here... Yes, I did setup the OpsGenie as a
receiver in my configuration and added the route. I did added a dummy label
in the "Alerting rules" (please see the test configuration I am using
below):
Enter code here...alertmanagerFiles:
alertmanager.yml:
global:
resolve_timeout: 1m
opsgenie_api_key: "76167a79-2edf-4fb2-8005-08e0d46edd61"
opsgenie_api_url: "https://api.opsgenie.com/"
route:
repeat_interval: 1h
group_wait: 10s
group_interval: 5m
receiver: 'saas-ops'
receivers:
- name: 'saas-ops'
opsgenie_configs:
- api_key: "API KEY"
api_url: "https://api.opsgenie.com/"
responders:
- name: "Vikram-test"
type: team
## Prometheus server ConfigMap entries
##
serverFiles:
## Alerts configuration
## Ref:
https://prometheus.io/docs/prometheus/latest/configuration/alerting_rules/
alerting_rules.yml:
groups:
- name: AllInstances
rules:
- alert: InstanceDown1
expr: up == 1
for: 1m
annotations:
title: 'Instance {{ $labels.instance }} down'
description: '{{ $labels.instance }} of job {{ $labels.job }} has
been down for more than 1 minute.'
labels:
severity: 'critical'
However, I am not sure how the "*labels*" here in Prometheus gets tagged
into as "*tags*" in OpsGenie? This part, I am mot sure.
Thanks
On Thursday, May 28, 2020 at 12:57:28 AM UTC-5, Sally Lehman wrote:
>
> You might be missing a couple keywords:
>
> 1. In your Alertmanager configuration you need to set up opsgenie as a
> receiver - https://prometheus.io/docs/alerting/configuration/#receiver.
>
> 2. Then set a route to that receiver:
> https://prometheus.io/docs/alerting/configuration/#route, the 'match'
> configuration within route has a label
>
> 3. That allows you to match the* label* from an alert rule you set up
> inside the prometheus configuration:
> https://prometheus.io/docs/prometheus/latest/configuration/alerting_rules/#defining-alerting-rules
>
> On Wednesday, May 27, 2020 at 3:53:56 PM UTC-7, vikram yerneni wrote:
>>
>> Fellas,
>> Anyone setup Alertmanager with OpsGenie integration "by using labels
>> within alerts" for Opsgenie to route the alerts to different teams based on
>> the labels set in the alerts?
>> I am trying to read it on this section but I cannot find any sort of
>> documentation online on how to achieve this configuration.
>>
>> Any tips here fellas...
>>
>> Thanks
>> Vikram
>>
>
--
You received this message because you are subscribed to the Google Groups
"Prometheus Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/prometheus-users/992129a7-a431-417b-8261-117eb9b22f63%40googlegroups.com.