Prometheus查询以提醒是否发生X时间在一个时间段?

发布于 2025-01-26 02:04:24 字数 190 浏览 5 评论 0原文

我正在研究一个查询,如果磁盘队列长度经常超过2,则应提醒该查询。说,如果发生在1d时期的10次。

我似乎无法围绕这个问题。我首先需要问题的次数,因此: count(windows_logical_disk_requests_queued> 2)

然后,我需要检查此查询在最后一维发生了多少次。我该怎么做?

I'm working on a query that should alert if the disk queue length gets above 2 frequently. Say, if it happens 10 times over a 1d period.

I can't seem to get my head around this one. I would first need the amount of times the issue occurs, so:
count(windows_logical_disk_requests_queued > 2)

Then I'd need to check how many times this query occurred over the last 1d. How do I do that?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

夜空下最亮的亮点 2025-02-02 02:04:24

您可以使用 count_over_time 。像:
count_over_time(windows_logical_disk_requests_queed [1d])> 10

You can use count_over_time. Something like:
count_over_time(windows_logical_disk_requests_queued[1d]) > 10

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文