Grafana Telegram 警报问题无法发送警报通知
我正在尝试在 Grafana 上设置电报通知,但收到此错误
测试无法发送通知。 这是我的 docker-compose.yml 文件
version: "3.7"
services:
loki:
image: grafana/loki:1.4.1
ports:
- "3100:3100"
command: -config.file=/etc/loki/local-config.yaml
promtail:
image: grafana/promtail:1.4.1
volumes:
- /var/lib/docker/containers:/var/lib/docker/containers
- /var/www/nt_devops/monitoring/docker-config.yml:/etc/promtail/docker-config.yml
command: -config.file=/etc/promtail/docker-config.yml
grafana:
image: grafana/grafana:master
ports:
- "9095:3000"
volumes:
- grafana_data:/var/lib/grafana
- grafana:/etc/grafana
volumes:
grafana_data:
grafana:
这是我的 grafana 容器日志
2-23T05:11:55+0000 lvl=eror msg="Request Completed" logger=context userId=1 orgId=1 uname=admin method=POST path=/api/alert-notifications/test status=500 remote_addr=10.0.0.2 time_ms=35 size=48 referer=https://grafana.example.com/alerting/notification/1/edit
t=2022-02-23T05:11:58+0000 lvl=info msg="Request Completed" logger=context userId=1 orgId=1 uname=admin method=GET path=/api/live/ws status=0 remote_addr=10.0.0.2 time_ms=1 size=0 referer=
t=2022-02-23T05:12:00+0000 lvl=info msg="Sending telegram notification" logger=alerting.notifier.telegram chat_id=-654204299 bot_token=5145999542:AAH16mk4Vh__sHh9JMnhdoNtELbRuuflbI4 apiAction=sendMessage
t=2022-02-23T05:12:00+0000 lvl=eror msg="Failed to send webhook" logger=alerting.notifier.telegram error="Webhook response status 400 Bad Request" webhook=grafana_telegram
t=2022-02-23T05:12:00+0000 lvl=eror msg="failed to send notification" logger=alerting.notifier uid= error="Webhook response status 400 Bad Request"
t=2022-02-23T05:12:00+0000 lvl=eror msg="failed to send notification" logger=alerting.notifier uid= error="Webhook response status 400 Bad Request"
t=2022-02-23T05:12:00+0000 lvl=eror msg="Failed to send alert notifications" logger=context userId=1 orgId=1 uname=admin error="Webhook response status 400 Bad Request" remote_addr=10.0.0.2
2-23T05:12:00+0000 lvl=eror msg="Request Completed" logger=context userId=1 orgId=1 uname=admin method=POST path=/api/alert-notifications/test status=500 remote_addr=10.0.0.2 time_ms=34 size=48 referer=https://grafana.example.com/alerting/notification/1/edit
t=2022-02-23T05:16:36+0000 lvl=info msg="Sending telegram notification" logger=alerting.notifier.telegram chat_id=-654204299 bot_token=5145999542:AAH16mk4Vh__sHh9JMnhdoNtELbRuuflbI4 apiAction=sendMessage
t=2022-02-23T05:16:36+0000 lvl=eror msg="Failed to send webhook" logger=alerting.notifier.telegram error="Webhook response status 400 Bad Request" webhook=grafana_telegram
t=2022-02-23T05:16:36+0000 lvl=eror msg="failed to send notification" logger=alerting.notifier uid= error="Webhook response status 400 Bad Request"
t=2022-02-23T05:16:36+0000 lvl=eror msg="failed to send notification" logger=alerting.notifier uid= error="Webhook response status 400 Bad Request"
t=2022-02-23T05:16:36+0000 lvl=eror msg="Failed to send alert notifications" logger=context userId=1 orgId=1 uname=admin error="Webhook response status 400 Bad Request" remote_addr=10.0.0.2
我正在使用主机网络,没有任何其他网络。我认为这是网络问题
这是浏览器控制台错误
I am trying to setup telegram notification on Grafana but I am getting this error
Test fails to send notification.
Here is my docker-compose.yml
file
version: "3.7"
services:
loki:
image: grafana/loki:1.4.1
ports:
- "3100:3100"
command: -config.file=/etc/loki/local-config.yaml
promtail:
image: grafana/promtail:1.4.1
volumes:
- /var/lib/docker/containers:/var/lib/docker/containers
- /var/www/nt_devops/monitoring/docker-config.yml:/etc/promtail/docker-config.yml
command: -config.file=/etc/promtail/docker-config.yml
grafana:
image: grafana/grafana:master
ports:
- "9095:3000"
volumes:
- grafana_data:/var/lib/grafana
- grafana:/etc/grafana
volumes:
grafana_data:
grafana:
Here is my grafana container logs
2-23T05:11:55+0000 lvl=eror msg="Request Completed" logger=context userId=1 orgId=1 uname=admin method=POST path=/api/alert-notifications/test status=500 remote_addr=10.0.0.2 time_ms=35 size=48 referer=https://grafana.example.com/alerting/notification/1/edit
t=2022-02-23T05:11:58+0000 lvl=info msg="Request Completed" logger=context userId=1 orgId=1 uname=admin method=GET path=/api/live/ws status=0 remote_addr=10.0.0.2 time_ms=1 size=0 referer=
t=2022-02-23T05:12:00+0000 lvl=info msg="Sending telegram notification" logger=alerting.notifier.telegram chat_id=-654204299 bot_token=5145999542:AAH16mk4Vh__sHh9JMnhdoNtELbRuuflbI4 apiAction=sendMessage
t=2022-02-23T05:12:00+0000 lvl=eror msg="Failed to send webhook" logger=alerting.notifier.telegram error="Webhook response status 400 Bad Request" webhook=grafana_telegram
t=2022-02-23T05:12:00+0000 lvl=eror msg="failed to send notification" logger=alerting.notifier uid= error="Webhook response status 400 Bad Request"
t=2022-02-23T05:12:00+0000 lvl=eror msg="failed to send notification" logger=alerting.notifier uid= error="Webhook response status 400 Bad Request"
t=2022-02-23T05:12:00+0000 lvl=eror msg="Failed to send alert notifications" logger=context userId=1 orgId=1 uname=admin error="Webhook response status 400 Bad Request" remote_addr=10.0.0.2
2-23T05:12:00+0000 lvl=eror msg="Request Completed" logger=context userId=1 orgId=1 uname=admin method=POST path=/api/alert-notifications/test status=500 remote_addr=10.0.0.2 time_ms=34 size=48 referer=https://grafana.example.com/alerting/notification/1/edit
t=2022-02-23T05:16:36+0000 lvl=info msg="Sending telegram notification" logger=alerting.notifier.telegram chat_id=-654204299 bot_token=5145999542:AAH16mk4Vh__sHh9JMnhdoNtELbRuuflbI4 apiAction=sendMessage
t=2022-02-23T05:16:36+0000 lvl=eror msg="Failed to send webhook" logger=alerting.notifier.telegram error="Webhook response status 400 Bad Request" webhook=grafana_telegram
t=2022-02-23T05:16:36+0000 lvl=eror msg="failed to send notification" logger=alerting.notifier uid= error="Webhook response status 400 Bad Request"
t=2022-02-23T05:16:36+0000 lvl=eror msg="failed to send notification" logger=alerting.notifier uid= error="Webhook response status 400 Bad Request"
t=2022-02-23T05:16:36+0000 lvl=eror msg="Failed to send alert notifications" logger=context userId=1 orgId=1 uname=admin error="Webhook response status 400 Bad Request" remote_addr=10.0.0.2
I am using host network no any other networks. I think it is networking issue
Here is browser console errors
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论