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: charts/alertmanager-config/README.md
+18-2Lines changed: 18 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,7 @@ _Warning: the AlertmanagerConfig CRD from Prometheus Operator is not yet stable
4
4
5
5
Specify behavior of Alertmanager with the [AlertmanagerConfig](https://prometheus-operator.dev/docs/operator/api/#monitoring.coreos.com/v1alpha1.AlertmanagerConfig) CRD from Prometheus Operator.
6
6
7
-
This chart makes it easy to provide common default configs while allowing flexibility to override those defaults.
7
+
This chart makes it easy to provide common default configs while allowing flexibility to override those defaults for example per namespace. It can also generate Alertmanager templates to be used by a global [AlertmanagerConfiguration](https://prometheus-operator.dev/docs/operator/api/#monitoring.coreos.com/v1.AlertmanagerConfiguration) (enable with `alertmanagerTemplates.enabled`).
8
8
9
9
Note: The configuration is scoped to the AlertmanagerConfig namespace; receivers and routes will automatically get a name prefix to avoid conflicts with receivers and routes configured elsewhere. Please see the related configuration options for Alertmanager and Prometheus.
10
10
@@ -42,7 +42,7 @@ To support routes as dicts, which are unordered (ie. items will not be in a pred
42
42
43
43
Note: The `order` field is sorted using the built-in Helm function sortAlpha because there doesn't seem to be a numeric sorting function available in Helm.
44
44
45
-
### Example
45
+
### Examples
46
46
`values.yaml`:
47
47
```yaml
48
48
labels:
@@ -86,3 +86,19 @@ receiverDefaults:
86
86
name: alertmanager-slack
87
87
sendResolved: true
88
88
```
89
+
90
+
Enable templates ConfigMap for global Alertmanager config:
91
+
```yaml
92
+
alertmanagerTemplates:
93
+
enabled: true
94
+
# templatesEnabledByDefault: false # disable all predefined templates to start from scratch with your own
95
+
# slack:
96
+
# enabled: false # disable individual templates
97
+
# example custom template, myCustomTemplates will be the key for this template in the generated ConfigMap:
Copy file name to clipboardExpand all lines: charts/alertmanager-config/docs/kube-prometheus-stack-alertmanager-global-config.md
+25-5Lines changed: 25 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,8 +1,8 @@
1
-
Example of configuring global Alertmanager config with an AlertmanagerConfig object when using the [kube-prometheus-stack](https://github.com/prometheus-community/helm-charts/tree/main/charts/kube-prometheus-stack) Helm chart.
1
+
Example of global Alertmanager config for the [kube-prometheus-stack](https://github.com/prometheus-community/helm-charts/tree/main/charts/kube-prometheus-stack) Helm chart.
# # key: api-url # secret should contain webhook url or https://slack.com/api/chat.postMessage if using bot token (see also slackApiUrl in global config - https://prometheus-operator.dev/docs/operator/api/#monitoring.coreos.com/v1.AlertmanagerGlobalConfig)
130
156
# # name: alertmanager-slack
@@ -149,3 +175,87 @@ receiverDefaults:
149
175
# httpConfig: {}
150
176
# wechatConfigs:
151
177
# httpConfig: {}
178
+
179
+
alertmanagerTemplates:
180
+
enabled: false
181
+
templatesEnabledByDefault: true
182
+
# <custom template name>:
183
+
# enabled: true
184
+
# templateString: |-
185
+
# {{/* my custom templates */}}
186
+
# # includeHelmTemplate: true # include Helm template "alertmanager-config.templates.<custom template name>" (only relevant if extending this chart)
0 commit comments