0

我有一个每小时开始的进程(在 python 中)。大约需要 20 分钟才能完成。我正在使用 Push Gateway 发送进程开始和结束的 prometheus 指标。

我创建了另一个脚本来生成有关流程的指标。但是,这些指标仅在 20 分钟的过程完成后才可用且相关。

我可以制作一个时间间隔为“每小时 30 分钟”的 scrape_config 吗?一个可比较的 cronjob 将是 "30 * * * *"

4

1 回答 1

0

No, there's no way to do that. Scrapes are staggered across the scrape interval to balance out the load.

What you probably want to do is have the 2nd script also push to the pushgateway.

于 2016-06-01T21:54:18.907 回答