mirror of
https://github.com/prometheus-operator/kube-prometheus.git
synced 2025-08-10 00:07:12 +02:00
With the objective of improving our README, customization examples are being moved to a dedicated folder under `docs/`. Signed-off-by: ArthurSens <arthursens2005@gmail.com>
41 lines
1.2 KiB
Markdown
41 lines
1.2 KiB
Markdown
### Alertmanager configuration
|
|
|
|
The Alertmanager configuration is located in the `values.alertmanager.config` configuration field. In order to set a custom Alertmanager configuration simply set this field.
|
|
|
|
```jsonnet mdox-exec="cat examples/alertmanager-config.jsonnet"
|
|
((import 'kube-prometheus/main.libsonnet') + {
|
|
values+:: {
|
|
alertmanager+: {
|
|
config: |||
|
|
global:
|
|
resolve_timeout: 10m
|
|
route:
|
|
group_by: ['job']
|
|
group_wait: 30s
|
|
group_interval: 5m
|
|
repeat_interval: 12h
|
|
receiver: 'null'
|
|
routes:
|
|
- match:
|
|
alertname: Watchdog
|
|
receiver: 'null'
|
|
receivers:
|
|
- name: 'null'
|
|
|||,
|
|
},
|
|
},
|
|
}).alertmanager.secret
|
|
```
|
|
|
|
In the above example the configuration has been inlined, but can just as well be an external file imported in jsonnet via the `importstr` function.
|
|
|
|
```jsonnet mdox-exec="cat examples/alertmanager-config-external.jsonnet"
|
|
((import 'kube-prometheus/main.libsonnet') + {
|
|
values+:: {
|
|
alertmanager+: {
|
|
config: importstr 'alertmanager-config.yaml',
|
|
},
|
|
},
|
|
}).alertmanager.secret
|
|
```
|