Skip to content

Commit f5dde9c

Browse files
authored
update docs also in the tmpl file (grafana#186)
Signed-off-by: ShuzZzle <niclas.schad@gmail.com>
1 parent 19459d8 commit f5dde9c

File tree

1 file changed

+46
-12
lines changed

1 file changed

+46
-12
lines changed

README.md.gotmpl

Lines changed: 46 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -88,18 +88,19 @@ alertmanager:
8888
```
8989
And here are the related configuration values in AlertManager and Ruler:
9090
```yaml
91-
alertmanager:
92-
data_dir: /data/
93-
storage:
94-
type : local
95-
local:
96-
path: /data
97-
ruler:
98-
rule_path: /data/rules
99-
storage:
100-
type : local
101-
local:
102-
directory: /tmp/rules
91+
config:
92+
alertmanager:
93+
data_dir: /data/
94+
storage:
95+
type : local
96+
local:
97+
path: /data
98+
ruler:
99+
rule_path: /data/rules
100+
storage:
101+
type : local
102+
local:
103+
directory: /tmp/rules
103104
```
104105
In AlertManager, the data_dir and local storage directory should be the same.
105106
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).
@@ -130,6 +131,39 @@ data:
130131
title: Node {{"{{ $labels.instance }}"}} has high CPU usage
131132

132133
```
134+
Example ConfigMap containing an alertmanager-config:
135+
```yaml
136+
apiVersion: v1
137+
kind: ConfigMap
138+
metadata:
139+
annotations:
140+
k8s-sidecar-target-directory: /data/fake
141+
labels:
142+
cortex_alertmanager: "1"
143+
name: alertmanager-example-config
144+
data:
145+
fake.yaml: |-
146+
global:
147+
resolve_timeout: 5m
148+
http_config: {}
149+
smtp_hello: localhost
150+
smtp_require_tls: true
151+
route:
152+
receiver: team-X-mails
153+
group_by:
154+
- alertname
155+
routes:
156+
- receiver: "null"
157+
match:
158+
alertname: Watchdog
159+
group_wait: 30s
160+
group_interval: 5m
161+
repeat_interval: 12h
162+
receivers:
163+
- name: 'team-X-mails'
164+
email_configs:
165+
- to: 'team-X+alerts@example.org'
166+
```
133167

134168
{{ template "chart.requirementsSection" . }}
135169

0 commit comments

Comments
 (0)