Prometheus query to alert if something happens x times within a time period?
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?