注释查询(Prometheus)
注释查询(Prometheus)
# 进程重启事件
changes(process_start_time_seconds{job="node"}[1h]) > 0
# 告警触发时间线
ALERTS{alertstate="firing"}
# 手工注释:Dashboard settings → Annotations → Add annotation把发布窗口标成注释后,故障时间线与变更时间点能对在一起看。
注释把发布、重启、告警触发画成时间竖线:Prometheus 数据源可用查询自动生成,也可手工标注发布窗口,便于对照“动作与曲线”。
# 进程重启事件
changes(process_start_time_seconds{job="node"}[1h]) > 0
# 告警触发时间线
ALERTS{alertstate="firing"}
# 手工注释:Dashboard settings → Annotations → Add annotation