From 3f3ac58fb5773b847cc4dba5fb167ee7cc70866a Mon Sep 17 00:00:00 2001 From: Victor Barba Martin Date: Thu, 4 Nov 2021 18:08:08 +0100 Subject: [PATCH] add monitoring templates --- .../templates/alertmanager-slack-config.yaml | 43 ------------------- .../templates/prometheus-rules.yaml | 15 ------- 2 files changed, 58 deletions(-) delete mode 100644 k8s/monitoring/templates/alertmanager-slack-config.yaml delete mode 100644 k8s/monitoring/templates/prometheus-rules.yaml diff --git a/k8s/monitoring/templates/alertmanager-slack-config.yaml b/k8s/monitoring/templates/alertmanager-slack-config.yaml deleted file mode 100644 index 3895565..0000000 --- a/k8s/monitoring/templates/alertmanager-slack-config.yaml +++ /dev/null @@ -1,43 +0,0 @@ -apiVersion: v1 -kind: Secret -type: Opaque -metadata: - name: slack-url - namespace: monitoring -data: - apiUrl: aHR0cHM6Ly9ob29rcy5zbGFjay5jb20vc2VydmljZXMvVDBMNVJBM0UwL0IwMVNNOFJDMzQ2L1hERE9yY1BFN2VBWEpQTUN2YzVGeEl2YQ== ---- -apiVersion: monitoring.coreos.com/v1alpha1 -kind: AlertmanagerConfig -metadata: - name: slack - namespace: monitoring - labels: - alertmanagerConfig: slack -spec: - route: - groupBy: ['alertname'] - groupWait: 30s - groupInterval: 5m - repeatInterval: 12h - receiver: 'slack-notifications' - receivers: - - name: 'slack-notifications' - slackConfigs: - - apiURL: - name: slack-url - key: apiUrl - channel: '#monitoring-alerts' - iconURL: 'https://avatars3.githubusercontent.com/u/3380462' - sendResolved: true - 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 }} \ No newline at end of file diff --git a/k8s/monitoring/templates/prometheus-rules.yaml b/k8s/monitoring/templates/prometheus-rules.yaml deleted file mode 100644 index e76c5f8..0000000 --- a/k8s/monitoring/templates/prometheus-rules.yaml +++ /dev/null @@ -1,15 +0,0 @@ -apiVersion: monitoring.coreos.com/v1 -kind: PrometheusRule -metadata: - namespace: - creationTimestamp: null - labels: - prometheus: example - role: alert-rules - name: prometheus-example-rules -spec: - groups: - - name: ./example.rules - rules: - - alert: ExampleAlert - expr: vector(1) \ No newline at end of file