From 2c70f62509fc0c150e5e2b7495ff6a6fa863f7cc Mon Sep 17 00:00:00 2001 From: Kazuhiro MUSASHI Date: Sat, 18 Jul 2020 14:57:31 +0900 Subject: [PATCH] Add configuration file for Alert Manager. --- .../files/etc/prometheus.d/alertmanager.yml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 cookbooks/prometheus/files/etc/prometheus.d/alertmanager.yml diff --git a/cookbooks/prometheus/files/etc/prometheus.d/alertmanager.yml b/cookbooks/prometheus/files/etc/prometheus.d/alertmanager.yml new file mode 100644 index 0000000..d95b147 --- /dev/null +++ b/cookbooks/prometheus/files/etc/prometheus.d/alertmanager.yml @@ -0,0 +1,17 @@ +global: + slack_api_url: 'https://hooks.slack.com/services/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' + +route: + receiver: 'test-route' + group_by: [alertname] + group_wait: 10s + group_interval: 1m + repeat_interval: 6h + +receivers: +- name: 'test-route' + slack_configs: + - channel: '#ops' + title: "{{ range .Alerts }}{{ .Annotations.summary }}\n{{ end }}" + text: "{{ range .Alerts }}{{ .Annotations.description }}\n{{ end }}" + send_resolved: true