Created
June 5, 2020 17:16
-
-
Save jewzaam/583eab4291b0f7698a46ef1c84f74334 to your computer and use it in GitHub Desktop.
example alertmanager configuration
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
global: | |
resolve_timeout: 5m | |
pagerduty_url: https://events.pagerduty.com/v2/enqueue | |
route: | |
receiver: "null" | |
group_by: | |
- job | |
routes: | |
- receiver: "null" | |
group_by: | |
- alertname | |
- severity | |
continue: true | |
routes: | |
- receiver: "null" | |
match: | |
alertname: KubeQuotaExceeded | |
- receiver: "null" | |
match: | |
alertname: UsingDeprecatedAPIAppsV1Beta1 | |
- receiver: "null" | |
match: | |
alertname: UsingDeprecatedAPIAppsV1Beta2 | |
- receiver: "null" | |
match: | |
alertname: UsingDeprecatedAPIExtensionsV1Beta1 | |
- receiver: "null" | |
match: | |
alertname: CPUThrottlingHigh | |
container: registry-server | |
- receiver: "null" | |
match: | |
alertname: CPUThrottlingHigh | |
container: configmap-registry-server | |
- receiver: "null" | |
match: | |
alertname: NodeFilesystemSpaceFillingUp | |
severity: warning | |
- receiver: "null" | |
match: | |
namespace: openshift-customer-monitoring | |
- receiver: "null" | |
match: | |
namespace: openshift-operators | |
- receiver: "null" | |
match: | |
alertname: SLAUptimeSRE | |
- receiver: "null" | |
match: | |
alertname: CustomResourceDetected | |
- receiver: "null" | |
match: | |
alertname: ImagePruningDisabled | |
- receiver: "null" | |
match: | |
severity: info | |
- receiver: make-it-warning | |
match: | |
alertname: KubeAPILatencyHigh | |
severity: critical | |
- receiver: pagerduty | |
match_re: | |
exported_namespace: ^default$|^kube.*|^openshift.*|^redhat-.* | |
- receiver: pagerduty | |
match: | |
exported_namespace: "" | |
match_re: | |
namespace: ^default$|^kube.*|^openshift.*|^redhat-.* | |
- receiver: pagerduty | |
match: | |
job: fluentd | |
- receiver: pagerduty | |
match: | |
alertname: FluentdNodeDown | |
- receiver: pagerduty | |
match: | |
cluster: elasticsearch | |
- receiver: watchdog | |
match: | |
alertname: Watchdog | |
repeat_interval: 5m | |
group_wait: 30s | |
group_interval: 5m | |
repeat_interval: 12h | |
receivers: | |
- name: pagerduty | |
pagerduty_configs: | |
- send_resolved: true | |
routing_key: REDACTED | |
description: '{{ .CommonLabels.alertname }} {{ .CommonLabels.severity | toUpper | |
}} ({{ len .Alerts }})' | |
details: | |
component: '{{ .CommonLabels.alertname }}' | |
group: '{{ .CommonLabels.alertname }}' | |
link: '{{ if .CommonAnnotations.link }}{{ .CommonAnnotations.link }}{{ else | |
}}https://github.com/openshift/ops-sop/tree/master/v4/alerts/{{ .CommonLabels.alertname | |
}}.md{{ end }}' | |
link2: '{{ if .CommonAnnotations.runbook }}{{ .CommonAnnotations.runbook }}{{ | |
else }}{{ end }}' | |
num_firing: '{{ .Alerts.Firing | len }}' | |
num_resolved: '{{ .Alerts.Resolved | len }}' | |
resolved: '{{ template "pagerduty.default.instances" .Alerts.Resolved }}' | |
severity: '{{ if .CommonLabels.severity }}{{ .CommonLabels.severity | toLower | |
}}{{ else }}critical{{ end }}' | |
- name: make-it-warning | |
pagerduty_configs: | |
- send_resolved: true | |
routing_key: REDACTED | |
description: '{{ .CommonLabels.alertname }} {{ .CommonLabels.severity | toUpper | |
}} ({{ len .Alerts }})' | |
details: | |
component: '{{ .CommonLabels.alertname }}' | |
group: '{{ .CommonLabels.alertname }}' | |
link: '{{ if .CommonAnnotations.link }}{{ .CommonAnnotations.link }}{{ else | |
}}https://github.com/openshift/ops-sop/tree/master/v4/alerts/{{ .CommonLabels.alertname | |
}}.md{{ end }}' | |
link2: '{{ if .CommonAnnotations.runbook }}{{ .CommonAnnotations.runbook }}{{ | |
else }}{{ end }}' | |
num_firing: '{{ .Alerts.Firing | len }}' | |
num_resolved: '{{ .Alerts.Resolved | len }}' | |
resolved: '{{ template "pagerduty.default.instances" .Alerts.Resolved }}' | |
severity: warning | |
- name: watchdog | |
webhook_configs: | |
- send_resolved: true | |
url: REDACTED | |
- name: "null" | |
templates: [] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment