You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+50-12Lines changed: 50 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -90,18 +90,19 @@ alertmanager:
90
90
```
91
91
And here are the related configuration values in AlertManager and Ruler:
92
92
```yaml
93
-
alertmanager:
94
-
data_dir: /data/
95
-
storage:
96
-
type : local
97
-
local:
98
-
path: /data
99
-
ruler:
100
-
rule_path: /data/rules
101
-
storage:
102
-
type : local
103
-
local:
104
-
directory: /tmp/rules
93
+
config:
94
+
alertmanager:
95
+
data_dir: /data/
96
+
storage:
97
+
type : local
98
+
local:
99
+
path: /data
100
+
ruler:
101
+
rule_path: /data/rules
102
+
storage:
103
+
type : local
104
+
local:
105
+
directory: /tmp/rules
105
106
```
106
107
In AlertManager, the data_dir and local storage directory should be the same.
107
108
In the Ruler, there needs to be two separate volumes. One is read-only and serves as the location shared with the sidecar that contains all of the rules that were derived from configmaps (/tmp/rules). The other is read-write and used by the Ruler itself for its own management of rules, etc (/data).
@@ -132,6 +133,39 @@ data:
132
133
title: Node {{ $labels.instance }} has high CPU usage
133
134
134
135
```
136
+
Example ConfigMap containing an alertmanager-config:
137
+
```yaml
138
+
apiVersion: v1
139
+
kind: ConfigMap
140
+
metadata:
141
+
annotations:
142
+
k8s-sidecar-target-directory: /data/fake
143
+
labels:
144
+
cortex_alertmanager: "1"
145
+
name: alertmanager-example-config
146
+
data:
147
+
fake.yaml: |-
148
+
global:
149
+
resolve_timeout: 5m
150
+
http_config: {}
151
+
smtp_hello: localhost
152
+
smtp_require_tls: true
153
+
route:
154
+
receiver: team-X-mails
155
+
group_by:
156
+
- alertname
157
+
routes:
158
+
- receiver: "null"
159
+
match:
160
+
alertname: Watchdog
161
+
group_wait: 30s
162
+
group_interval: 5m
163
+
repeat_interval: 12h
164
+
receivers:
165
+
- name: 'team-X-mails'
166
+
email_configs:
167
+
- to: 'team-X+alerts@example.org'
168
+
```
135
169
136
170
## Requirements
137
171
@@ -263,6 +297,8 @@ Kubernetes: `^1.19.0-0`
263
297
| compactor.terminationGracePeriodSeconds | int | `240` | |
| config.alertmanager.storage | object | {} | Type of backend to use to store alertmanager configs. Supported values are: "configdb", "gcs", "s3", "local". refer to: https://cortexmetrics.io/docs/configuration/configuration-file/#alertmanager_config |
0 commit comments