Skip to content

Instantly share code, notes, and snippets.

@l13t
Created January 16, 2019 13:21
Show Gist options
  • Select an option

  • Save l13t/d432b63641b6972b1f58d7c037eec88f to your computer and use it in GitHub Desktop.

Select an option

Save l13t/d432b63641b6972b1f58d7c037eec88f to your computer and use it in GitHub Desktop.

Revisions

  1. l13t created this gist Jan 16, 2019.
    62 changes: 62 additions & 0 deletions values.yaml
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,62 @@
    .......some config.....
    alertmanager:

    ## Deploy alertmanager
    ##
    enabled: true

    ## Service account for Alertmanager to use.
    ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/
    ##
    serviceAccount:
    create: true
    name: ""

    ## Configure pod disruption budgets for Alertmanager
    ## ref: https://kubernetes.io/docs/tasks/run-application/configure-pdb/#specifying-a-poddisruptionbudget
    ## This configuration is immutable once created and will require the PDB to be deleted to be changed
    ## https://github.com/kubernetes/kubernetes/issues/45398
    ##
    podDisruptionBudget:
    enabled: false
    minAvailable: 1
    maxUnavailable: ""

    ## Alertmanager configuration directives
    ## ref: https://prometheus.io/docs/alerting/configuration/#configuration-file
    ## https://prometheus.io/webtools/alerting/routing-tree-editor/
    ##
    config:
    global:
    resolve_timeout: 5m
    slack_api_url: "<slack_url>"
    route:
    group_by: ['job']
    group_wait: 30s
    group_interval: 5m
    repeat_interval: 12h
    #receiver: 'slack'
    routes:
    - match:
    alertname: DeadMansSwitch
    receiver: 'null'
    - match:
    receiver: 'slack'
    continue: true
    receivers:
    - name: 'null'
    - name: 'slack'
    slack_configs:
    - channel: '#alertmanager-live'
    send_resolved: false
    title: '[{{ .Status | toUpper }}{{ if eq .Status "firing" }}:{{ .Alerts.Firing | len }}{{ end }}] Monitoring Event Notification'
    text: >-
    {{ range .Alerts }}
    *Alert:* {{ .Annotations.summary }} - `{{ .Labels.severity }}`
    *Description:* {{ .Annotations.description }}
    *Graph:* <{{ .GeneratorURL }}|:chart_with_upwards_trend:> *Runbook:* <{{ .Annotations.runbook }}|:spiral_note_pad:>
    *Details:*
    {{ range .Labels.SortedPairs }} • *{{ .Name }}:* `{{ .Value }}`
    {{ end }}
    {{ end }}
    .......some config.....