Skip to content

文档理解问题 #1183

Answered by UlricQin
danyangzhu asked this question in Q&A
Discussion options

You must be logged in to vote

举个例子,http_response插件,采集HTTP地址的连通性,如果能连通,会采集到这个指标:

http_response_result_code{code="0", result="success",target="https://flashcat.cloud/"} 0

如果失败,上报的数据就变成了:

http_response_result_code{code="1", result="failed",target="https://flashcat.cloud/"} 1

在Prometheus生态里,标签变化就是不同的指标了。但是实际上,在业务上来看,这俩指标是有连续性语义的。所以这么打标签在Prometheus里不合适,也就是我说的标签非稳态结构。

这种数据,如果想简单的做告警规则:http_response_result_code!=0,就会很难受了,在夜莺里,即使告警恢复了也没法产生恢复事件

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by danyangzhu
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants