Skip to content

AliSms,AliVms,WxworkRobot,etc integration for Prometheus Alertmanager

Notifications You must be signed in to change notification settings

ichaf1997/alertmanager2

Repository files navigation

Alertmanager2

Alertmanager Webhook with integration AliSms AliVms WxworkRobot ElasticSearchAPI etc.

Build

make

How to use

bin/alertmanager2

API examples

# 发送短信消息 (Prometheus notification)
curl -X POST "http://127.0.0.1:8080/channel/ali/sendsms?phone=手机号码&templatecode=短信模板代码&signname=短信签名&ak=AK密钥&as=AS密钥&tpname=渲染模板名称" -d @alertmanager_webhook_payload_example.json -v

# 发送语音消息 (Prometheus notification)
curl -X POST "http://127.0.0.1:8080/channel/ali/sendvms?phone=手机号码&templatecode=语音模板代码&ak=AK密钥&as=AS密钥&tpname=渲染模板名称" -d @alertmanager_webhook_payload_example.json -v

# 发送短信消息 (normal notification)
curl 'http://127.0.0.1:8080/channel/ali/sendsimplesms?phone=手机号码&templatecode=短信模板代码' -v -d '{"content": "这是一条测试的短信告警消息"}'

# 发送语音消息 (normal notification)
curl 'http://127.0.0.1:8080/channel/ali/sendsimplevms?phone=手机号码&templatecode=语音模板代码' -v -d '{"content": "这是一条测试的语音告警消息"}'

阿里云语音接口默认使用公共模式呼出,如需要指定固定号码呼出,需要额外指定一个查询参数callnumber=xxx

About

AliSms,AliVms,WxworkRobot,etc integration for Prometheus Alertmanager

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published