概述
查看Prometheus检查的详细数据是如何在Zabbix中实现的。
配置
低级发现规则应该作为监控项依赖创建到Prometheus数据的HTTP监控项中。
Prometheus转JSON
在发现规则中,进入Preprocessing选项卡,并选择Prometheus to JSON Preprocessing选项。发现需要JSON格式的数据,而Prometheus to JSON预处理选项将会返回正确的数据,包含以下属性:
metric name
metric value
type (if present)
labels (if present)
raw line
例如,查询 :
返回:
映射LLD宏
接下来,你必须进入LLD宏标签,并创建以下映射:
监控项原型
你可能想要这样创建一个监控项原型:
与预处理选项: