# alertmanager-webhook **Repository Path**: soliton/alertmanager-webhook ## Basic Information - **Project Name**: alertmanager-webhook - **Description**: alertmanager-webhook告警插件 - **Primary Language**: Python - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 1 - **Forks**: 0 - **Created**: 2023-09-12 - **Last Updated**: 2023-09-21 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README ### Alertmanager-Webhook插件使用 - 使用Systemd管理 ```shell cp services/alertmanager-webhook.service /usr/lib/systemd/system/ chmod +x /usr/lib/systemd/system/alertmanager-webhook.service ``` - Python版本要求 ```shell Python3 ``` - pip3 安装模块 ```shell pip3 install -requirements.txt ``` - 启动/开机启动,关闭,重启 ```shell systemctl status alertmanager-webhook # 查看状态 systemctl start alertmanager-webhook # 启动服务 systemctl enable alertmanager-webhook # 开机启动 systemctl stop alertmanager-webhook # 停止服务 ``` - alertmanager 服务配置 ```shell global: resolve_timeout: 5m route: receiver: webhook group_wait: 3s group_interval: 5s repeat_interval: 5m group_by: [alertname] routes: - receiver: webhook group_wait: 10s match: team: node receivers: - name: webhook webhook_configs: - url: http://127.0.0.1:9060/webhook/wechat/send send_resolved: true - url: http://127.0.0.1:9060/webhook/dingtalk/send send_resolved: true ``` 修改完alertmanager.yml配置文件重启服务