-
-
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
14 changed files
with
143 additions
and
91 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,4 +19,4 @@ spec: | |
wait: true | ||
interval: 30m | ||
retryInterval: 1m | ||
timeout: 15m | ||
timeout: 5m |
77 changes: 77 additions & 0 deletions
77
kubernetes/apps/monitoring/kube-prometheus-stack/app/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
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.
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
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 |
---|---|---|
|
@@ -5,7 +5,6 @@ metadata: | |
name: loki | ||
spec: | ||
interval: 30m | ||
timeout: 15m | ||
chart: | ||
spec: | ||
chart: loki | ||
|
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 |
---|---|---|
|
@@ -19,4 +19,4 @@ spec: | |
wait: true | ||
interval: 30m | ||
retryInterval: 1m | ||
timeout: 15m | ||
timeout: 5m |
22 changes: 22 additions & 0 deletions
22
kubernetes/apps/monitoring/prometheus-operator-crds/app/helmrelease.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,22 @@ | ||
--- | ||
apiVersion: helm.toolkit.fluxcd.io/v2 | ||
kind: HelmRelease | ||
metadata: | ||
name: prometheus-operator-crds | ||
spec: | ||
interval: 30m | ||
chart: | ||
spec: | ||
chart: prometheus-operator-crds | ||
version: 16.0.1 | ||
sourceRef: | ||
kind: HelmRepository | ||
name: prometheus-community | ||
namespace: flux-system | ||
install: | ||
remediation: | ||
retries: 3 | ||
upgrade: | ||
cleanupOnFail: true | ||
remediation: | ||
retries: 3 |
5 changes: 5 additions & 0 deletions
5
kubernetes/apps/monitoring/prometheus-operator-crds/app/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,5 @@ | ||
--- | ||
apiVersion: kustomize.config.k8s.io/v1beta1 | ||
kind: Kustomization | ||
resources: | ||
- ./helmrelease.yaml |
22 changes: 22 additions & 0 deletions
22
kubernetes/apps/monitoring/prometheus-operator-crds/ks.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,22 @@ | ||
--- | ||
apiVersion: kustomize.toolkit.fluxcd.io/v1 | ||
kind: Kustomization | ||
metadata: | ||
name: &app prometheus-operator-crds | ||
namespace: flux-system | ||
spec: | ||
targetNamespace: monitoring | ||
commonMetadata: | ||
labels: | ||
app.kubernetes.io/name: *app | ||
dependsOn: | ||
- name: rook-ceph-cluster | ||
path: ./kubernetes/apps/monitoring/prometheus-operator-crds/app | ||
prune: false # never should be deleted | ||
sourceRef: | ||
kind: GitRepository | ||
name: k8s-gitops | ||
wait: true | ||
interval: 30m | ||
retryInterval: 1m | ||
timeout: 5m |
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