【发布时间】:2021-07-27 20:30:06
【问题描述】:
我正在使用 Hystrix、千分尺、普罗米修斯。
以下查询有效,但我需要修改它,我不知道如何:
sum by(group, key) (increase(hystrix_execution_total{event="exception_thrown"}[1m])) / sum by(group, key) (increase(hystrix_execution_terminal_total[1m])) * 100 >= 5
基本上exception_thrown 是Hystrix 发出的一个事件,但Hystrix 也发出另一个指标bad_request 表示客户端错误(400)。为了准确衡量上游服务器错误,我需要减去两个具有相同标签但值不同的指标,然后得到每分钟的警报率
hystrix_execution_total{job="auth",key="authenticate",event="exception_thrown"} - hystrix_execution_total{job="auth",key="authenticate",event="bad_request"}
【问题讨论】:
标签: prometheus grafana hystrix