alertmanager.yaml
global:
slack_api_url: 'https://hooks.slack.com/services/../../...'
route:
receiver: 'slack-notifications'
group_by: [alertname, datacenter, app]
receivers:
- name: 'slack-notifications'
slack_configs:
- channel: '#alerts'
text: 'https://mywebsite.com/alerts/{{ .GroupLabels.app }}/{{ .GroupLabels.alertname }}'
./alertManager/alertmanager --config.file=alertManager/alertmanager.yaml
go run alertSender/main.go
go run alertLister/listAlert.go
https://github.com/prometheus/alertmanager#architecture