SHARE
TWEET

Untitled

a guest Sep 16th, 2019 88 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. apiVersion: v1
  2. data:
  3.   alertmanager.yml: |-
  4.     # The root route on which each incoming alert enters.
  5.     route:
  6.      # default/backup route if none match (Slack webhook)
  7.       receiver: liquid-team
  8.  
  9.       # The labels by which incoming alerts are grouped together. For example,
  10.       # multiple alerts coming in for cluster=A and alertname=LatencyHigh would
  11.       # be batched into a single group.
  12.       group_by: ['alertname','instance','pod', 'podname', 'node', 'nodes', 'master']
  13.  
  14.       # When a new group of alerts is created by an incoming alert, wait at
  15.       # least 'group_wait' to send the initial notification.
  16.       # This way ensures that you get multiple alerts for the same group that start
  17.       # firing shortly after another are batched together on the first
  18.       # notification.
  19.       group_wait: 20s
  20.  
  21.       # When the first notification was sent, wait 'group_interval' to send a batch
  22.       # of new alerts that started firing for that group.
  23.       group_interval: 10m
  24.  
  25.       # If an alert has successfully been sent, wait 'repeat_interval' to
  26.       # resend them.
  27.       repeat_interval: 12h
  28.  
  29.       routes:
  30.       - match:
  31.           severity: WARNING
  32.         receiver: victorops-warning
  33.         continue: true
  34.       - match:
  35.           severity: CRITICAL
  36.         receiver: victorops-critical
  37.         continue: true
  38.     receivers:
  39.       - name: victorops-warning
  40.         victorops_configs:
  41.         - api_key: my-key
  42.           routing_key: 'liquid_routing_key'
  43.           message_type: 'WARNING'
  44.           entity_display_name: {{ "'{{ .CommonAnnotations.summary }}'" }}
  45.           state_message: {{ "'{{  template \"slack.my.text\" . }}'" }}
  46.       - name: victorops-critical
  47.         victorops_configs:
  48.         - api_key: my-key
  49.           routing_key: 'liquid_routing_key'
  50.           message_type: 'CRITICAL'
  51.           entity_display_name: {{ "'{{ .CommonAnnotations.summary }}'" }}
  52.           state_message: {{ "'{{  template \"slack.my.text\" . }}'" }}
  53.  
  54.  
  55.     templates:
  56.    - 'slack.tmpl'
  57.   slack.tmpl: |-
  58.       {{ "{{" }} define "slack.my.text" -{{ "}}" }}
  59.           {{ "{{-" }} range $i, $alert := .Alerts {{ "}}" }}
  60.               {{ "{{-" }} if lt $i 1 {{ "-}}" }}
  61.                 {{ "{{- .Annotations.description -}}" }}
  62.                 *Graph:*  {{ "<{{" }} .GeneratorURL {{ "}}" }} |:chart_with_upwards_trend:> *Runbook:*  {{ "<{{" }} .Annotations.runbook {{ "}}" }} |:spiral_note_pad:>
  63.              {{ "{{-" }} end {{ "-}}" }}
  64.           {{ "{{-" }} end {{ "-}}" }}
  65.       {{ "{{-" }} end {{ "}}" }}
  66. kind: ConfigMap
  67. metadata:
  68.   creationTimestamp: null
  69.   name: alertmanager
  70.   namespace: monitoring
  71.   selfLink: /api/v1/namespaces/monitoring/configmaps/alertmanager
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top