grafana配置告警时出现500 Internal Server Error错误提示
环境
- grafana-7.3.3
- ClickHouse server version 20.4.9.110
- centos 7.6
- 插件:clickhouse-grafana-2.1.0
grafana 告警 提示 500 Internal Server Error
配置告警,测试时出现错误信息:
#日志中错误信息:
t=2020-12-10T10:43:37+0800 lvl=eror msg="Alert Rule Result Error" logger=alerting.evalContext ruleId=1 name="cpu usage alert alert" error="tsdb.HandleRequest() error rpc error: code = Unknown desc = invalid status code. status: 500 Internal Server Error" changing state to=alerting
报警正常触发,但无法获取详细数据信息:
原因:在grafana DataSource配置中使用了Basic auth
解决方法:关闭Basic auth,使用Yandex.Cloud authorization,配置X-ClickHouse-User和X-ClickHouse-Key
再次测试告警:
参考资料:cilkhouse-grafana-issues、clickhouse-grafana、clickhouse.tech