Skip to content
Snippets Groups Projects
Commit 5ccb3a4e authored by Marat Kalibekov's avatar Marat Kalibekov
Browse files

How to add more slack channels to alertmanager

parent 2434d8cd
No related branches found
No related tags found
1 merge request!234More information about slack channels in alerting
Loading
Loading
@@ -70,6 +70,30 @@ All alerts are routed to slack and additionally can be paged to PagerDuty.
 
Currently we are not using email alerting rules.
 
### Add more slack channels to alerts
1. In routes section of [alertmanager.yml template](https://gitlab.com/gitlab-cookbooks/gitlab-prometheus/blob/master/templates/default/alertmanager.yml.erb) add following:
```
- match:
channel: gitaly
receiver: slack_gitaly
continue: true
```
1. In receivers section [alertmanager.yml template](https://gitlab.com/gitlab-cookbooks/gitlab-prometheus/blob/master/templates/default/alertmanager.yml.erb) add following. Note that `send_resolved`, `icon_emoji`, etc values must be taken from `slack_production` receiver:
```
- name: slack_gitaly
slack_configs:
- api_url: '<%= @conf['slack']['api_url'] %>'
channel: '#gitaly'
send_resolved: true
icon_emoji: ...
title: ...
title_link: ...
text: ...
fallback: ...
```
### Note about alerts which not fit in any routes
 
1. Alerts which are routed by default route will be sent to `#prometheus-alerts` channel in slack.
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment