This article mainly introduces how to configure Alertmanager to send messages to Slack.
For cluster monitoring alarm deployment, please refer to cluster monitoring alarm deployment
- Users who use Slack Alarm need to have the Slack robot Webhook address and receive alarm information through Webhook. For the method of obtaining it, please refer to Official Document;
- Edit the Alertmanager configuration file, click Edit in Environment Configuration -> Configuration File Configuration
- The following is the template file, after the modification is completed, you can overwrite the original configuration file and update the component.
url does not need to be modified, other content should be modified as needed
global: resolve_timeout: 5m route: receiver: webhook group_wait: 30s group_interval: 5m repeat_interval: 5m group_by: [alertname] routes: - receiver: webhook group_wait: 10s receivers: - name: webhook webhook_configs: - url: http://127.0.0.1:8060/slack/webhook1/send send_resolved: true
- The recommended security settings when obtaining Slack Webhook address are as follows:
- After obtaining the Slack Webhook address, manually modify the Webhook address of the Slack component
Modify the value of the
WEBHOOK_ADDRESS variable in the Slack component page -> Environment configuration, and the update will take effect after the modification is completed.
This completes the deployment of Slack alarm.