4

我们已经运行了 node_exporter,并且我正在使用文本文件收集器让我输入由作业修改的文件的时间戳。

指标输出:

# HELP job_timestamp_file Metric read from /usr/local/etc/node_exporter/job-timestamp.prom
# TYPE job_timestamp_file untyped
job_timestamp_file 1.567657381e+09

所以我们已经成功地在普罗米修斯中收集了它。我和我的舞会家伙遇到的问题,对于 prometheus 和 grafana 来说都是新手,是如何编写查询以触发警报,如果

当前纪元时间 - job_timestamp_file > 86400

这真的看起来应该很容易......

4

1 回答 1

4

time() - job_timestamp_file > 86400

节点导出器还公开它通过文本文件收集器读取的文件的 mtime。

于 2019-09-05T18:34:52.387 回答