-
-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(kps): move to alertmanager spec
- Loading branch information
Showing
7 changed files
with
115 additions
and
87 deletions.
There are no files selected for viewing
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
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
71 changes: 0 additions & 71 deletions
71
kubernetes/apps/monitoring/kube-prometheus-stack/app/resources/alertmanager.yaml
This file was deleted.
Oops, something went wrong.
77 changes: 77 additions & 0 deletions
77
kubernetes/apps/monitoring/kube-prometheus-stack/configs/alertmanagerconfig.yaml
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
--- | ||
apiVersion: monitoring.coreos.com/v1alpha1 | ||
kind: AlertmanagerConfig | ||
metadata: | ||
name: alertmanager | ||
spec: | ||
route: | ||
groupBy: ["alertname", "job"] | ||
groupInterval: 10m | ||
groupWait: 1m | ||
receiver: pushover | ||
repeatInterval: 12h | ||
routes: | ||
- receiver: "null" | ||
matchers: [{name: alertname, value: InfoInhibitor, matchType: =}] | ||
- receiver: heartbeat | ||
groupInterval: 15s | ||
groupWait: 0s | ||
repeatInterval: 5m | ||
matchers: [{name: alertname, value: Watchdog, matchType: =}] | ||
- receiver: pushover | ||
matchers: [{name: severity, value: critical, matchType: =}] | ||
|
||
inhibitRules: | ||
- equal: ["alertname", "namespace"] | ||
sourceMatch: | ||
- name: severity | ||
value: critical | ||
matchType: = | ||
- name: severity | ||
value: warning | ||
matchType: =~ | ||
|
||
receivers: | ||
- name: "null" | ||
- name: heartbeat | ||
webhookConfigs: | ||
- urlSecret: | ||
name: &secret alertmanager-secret | ||
key: ALERTMANAGER_HEARTBEAT_URL | ||
- name: pushover | ||
pushoverConfigs: | ||
- html: true | ||
message: |- | ||
{{- range .Alerts }} | ||
{{- if ne .Annotations.description "" }} | ||
{{ .Annotations.description }} | ||
{{- else if ne .Annotations.summary "" }} | ||
{{ .Annotations.summary }} | ||
{{- else if ne .Annotations.message "" }} | ||
{{ .Annotations.message }} | ||
{{- else }} | ||
Alert description not available | ||
{{- end }} | ||
{{- if gt (len .Labels.SortedPairs) 0 }} | ||
<small> | ||
{{- range .Labels.SortedPairs }} | ||
<b>{{ .Name }}:</b> {{ .Value }} | ||
{{- end }} | ||
</small> | ||
{{- end }} | ||
{{- end }} | ||
priority: |- | ||
{{ if eq .Status "firing" }}1{{ else }}0{{ end }} | ||
sendResolved: true | ||
sound: gamelan | ||
title: >- | ||
[{{ .Status | toUpper }}{{ if eq .Status "firing" }}:{{ .Alerts.Firing | len }}{{ end }}] | ||
{{ .CommonLabels.alertname }} | ||
ttl: 3600s | ||
token: | ||
name: *secret | ||
key: ALERTMANAGER_PUSHOVER_APP_TOKEN | ||
userKey: | ||
name: *secret | ||
key: ALERTMANAGER_PUSHOVER_USER_KEY | ||
urlTitle: View in Alertmanager |
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
6 changes: 6 additions & 0 deletions
6
kubernetes/apps/monitoring/kube-prometheus-stack/configs/kustomization.yaml
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
apiVersion: kustomize.config.k8s.io/v1beta1 | ||
kind: Kustomization | ||
resources: | ||
- ./alertmanagerconfig.yaml | ||
- ./externalsecret.yaml |
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