Hi,

I have got prometheus and alert manager set up and running. I am using 
pagerduty as receiver from alertmanager. Now, i want to create separate 
services in pagerduty for separate applications. How do i configure 
alertmanager to send these alerts to the service based on the application 
name?

How does default-receiver work here? Also, application is a label in my 
prometheus.yml config. Am i correct in saying that the application comes 
from prometheus.yml config? 

global:
  resolve_timeout: 1m
route:
  receiver: default-receiver
  routes:
  - receiver: teamA
    match:
      application: appA
  - receiver: teamB
    match:
      application: appB
receivers:
- name: default-receiver 
- name: teamA
  pagerduty_configs:
  - send_resolved: true
    routing_key: ${PAGERDUTY_KEY_APPA}
    description: '{{ template "pagerduty.default.description" .}}'
    severity: '{{ .CommonLabels.severity }}'
    details:
      summary: |-
        {{ range .Alerts }}{{ .Annotations.summary }}
        {{ end }}
      severity: '{{ .CommonLabels.severity }}'
      status: '{{ .Status }}'
- name: teamB 
  - send_resolved: true
    routing_key: ${PAGERDUTY_KEY_APPB}
    description: '{{ template "pagerduty.default.description" .}}'
    severity: '{{ .CommonLabels.severity }}'
    details:
      summary: |-
        {{ range .Alerts }}{{ .Annotations.summary }}
        {{ end }}
      severity: '{{ .CommonLabels.severity }}'
      status: '{{ .Status }}'

-- 
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/ab122ff3-6747-4fb2-bcb7-7b258a284a76o%40googlegroups.com.

Reply via email to