global: resolve_timeout: 5m slack_api_url: .....templates:- '/etc/alertmanager/template/*.tmpl'
route: group_by: [ 'alertname', 'cluster' ] # how long to initially wait to send a notification # (allows for inhibiting alert to arrive) group_wait: 30s # how often to send notifications for this group group_interval: 5m # how long to wait before re-sending a given alert that # has already been sent repeat_interval: 5m receiver: default-receiver
inhibit_rules:- source_match: severity: 'critical' target_match: severity: 'warning'# apply inhibition if alertname is the same equal: [ 'alertname', 'cluster', 'namespace', 'deployment' ]
receivers:- name: 'default-receiver' slack_configs: - channel: '#tps-reports' title: '[{{ .Status | toUpper }}{{ if eq .Status "firing" }}:{{ .Alerts.Firing | len }}{{ end }}] Prometheus Event Notification' text: >- {{ range .Alerts }} *Alert:* {{ .Annotations.summary }} - `{{ .Labels.severity }}` *Description:* {{ .Annotations.description }} *Details:* {{ range .Labels.SortedPairs }} - {{ .Name }}: `{{ .Value }}` {{ end }} {{ end }} send_resolved: true
groups:- name: pod.rules rules: - alert: DeploymentReplicasUnavailable expr: kube_deployment_status_replicas - kube_deployment_status_replicas_available > 0 for: 1m labels: severity: warning annotations: description: Deployment {{ $labels.deployment }} has {{ $value }} unavailable replicas summary: "{{ $labels.deployment }} : {{ $value }} replicas unavailable" - alert: DeploymentReplicasUnavailable expr: kube_deployment_status_replicas_available == 0 for: 1m labels: severity: critical annotations: description: Deployment {{ $labels.deployment }} has no available replicas summary: "{{ $labels.deployment }} : no replicas available"
--
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 prometheus-users+unsubscribe@googlegroups.com.
To post to this group, send email to prometheus-users@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/prometheus-users/9867135d-079c-4804-9575-2701adcea8fd%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.