You are setting the `tags` key twice, that probably has unintended
consequences. What are the labels on the alert? What tags end up being set
in OpsGenie?

/MR

On Tue, Jun 2, 2020 at 9:53 PM vikram yerneni <[email protected]> wrote:

> Fellas,
> I am not a developer here, so asking in layman terms.
> I am trying to set integration between Prometheus/Alertmanager with
> OpsGenie and alerts to get route to multiple teams using "tags" option in
> OpsGenie.
> So in order to set the tags field, it seems that can be achieved from
> Alertmanager configuration (this is managed from Alertmanager
> configuration) or even from individual alerts (this is managed from
> Prometheus configuration).
>
> Please see below for the Alertmanager configuration (the "tags" part
> didn't worked):
> apiVersion: v1
> data:
>   alertmanager.yml: |
>     global:
>       opsgenie_api_key: “”
>       opsgenie_api_url: https://api.opsgenie.com/
>       resolve_timeout: 1m
>     receivers:
>     - name: saas-ops
>       opsgenie_configs:
>       - send_resolved: true
>         teams: Operations
>         tags: nonprod
>         tags: '{{ range .Alerts }}{{ .Labels.Values | join "," }}{{end}}'
>         priority: '{{ range .Alerts }}{{ if eq .Labels.severity
> "critical"}}P1{{else}}P3{{end}}{{end}}'
>       - api_key: “”
>         api_url: https://api.opsgenie.com/
>         responders:
>         - name: teamname
>           type: team
>     route:
>       group_interval: 1m
>       group_wait: 10s
>       receiver: saas-ops
>       repeat_interval: 1m
>
>
>
> I am little confused on how to achieve this fellas...
>
>
> Thanks
> Vikram Y
>
> --
> 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/221fc025-af67-48ba-96db-c85871722a76%40googlegroups.com
> <https://groups.google.com/d/msgid/prometheus-users/221fc025-af67-48ba-96db-c85871722a76%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

-- 
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/CAMV%3D_gZyQN%3D_Gh9eU2273r%3DJfZwt7RYkbgHNpcK4r0gOy8qx5A%40mail.gmail.com.

Reply via email to