Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- apiVersion: v1
- data:
- alertmanager.yml: |-
- # The root route on which each incoming alert enters.
- route:
- # default/backup route if none match (Slack webhook)
- receiver: liquid-team
- # The labels by which incoming alerts are grouped together. For example,
- # multiple alerts coming in for cluster=A and alertname=LatencyHigh would
- # be batched into a single group.
- group_by: ['alertname','instance','pod', 'podname', 'node', 'nodes', 'master']
- # When a new group of alerts is created by an incoming alert, wait at
- # least 'group_wait' to send the initial notification.
- # This way ensures that you get multiple alerts for the same group that start
- # firing shortly after another are batched together on the first
- # notification.
- group_wait: 20s
- # When the first notification was sent, wait 'group_interval' to send a batch
- # of new alerts that started firing for that group.
- group_interval: 10m
- # If an alert has successfully been sent, wait 'repeat_interval' to
- # resend them.
- repeat_interval: 12h
- routes:
- - match:
- severity: WARNING
- receiver: victorops-warning
- continue: true
- - match:
- severity: CRITICAL
- receiver: victorops-critical
- continue: true
- receivers:
- - name: victorops-warning
- victorops_configs:
- - api_key: my-key
- routing_key: 'liquid_routing_key'
- message_type: 'WARNING'
- entity_display_name: {{ "'{{ .CommonAnnotations.summary }}'" }}
- state_message: {{ "'{{ template \"slack.my.text\" . }}'" }}
- - name: victorops-critical
- victorops_configs:
- - api_key: my-key
- routing_key: 'liquid_routing_key'
- message_type: 'CRITICAL'
- entity_display_name: {{ "'{{ .CommonAnnotations.summary }}'" }}
- state_message: {{ "'{{ template \"slack.my.text\" . }}'" }}
- templates:
- - 'slack.tmpl'
- slack.tmpl: |-
- {{ "{{" }} define "slack.my.text" -{{ "}}" }}
- {{ "{{-" }} range $i, $alert := .Alerts {{ "}}" }}
- {{ "{{-" }} if lt $i 1 {{ "-}}" }}
- {{ "{{- .Annotations.description -}}" }}
- *Graph:* {{ "<{{" }} .GeneratorURL {{ "}}" }} |:chart_with_upwards_trend:> *Runbook:* {{ "<{{" }} .Annotations.runbook {{ "}}" }} |:spiral_note_pad:>
- {{ "{{-" }} end {{ "-}}" }}
- {{ "{{-" }} end {{ "-}}" }}
- {{ "{{-" }} end {{ "}}" }}
- kind: ConfigMap
- metadata:
- creationTimestamp: null
- name: alertmanager
- namespace: monitoring
- selfLink: /api/v1/namespaces/monitoring/configmaps/alertmanager
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement