Hi Matthias, Sorry this part (tags: nonprod) is a typo in my post. Without the typo, I am not getting any tags in the OpsGenie at all. Literally nothing.
On Wednesday, June 3, 2020 at 1:54:33 AM UTC-5, Matthias Rampke wrote: > > 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] > <javascript:>> 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] <javascript:>. >> 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/b38eec4f-973c-4287-8061-1826d76a18a1%40googlegroups.com.

