'Can I create an alert in Prometheus when a value is outside of an range of previous values?
I want to monitor spring batches. To do that I have set up metrics in the source code and send them via a PushGateway to Prometheus. In Prometheus I want to set an alerting rule if the current value is outside of the interquartile range of that metric.
My metric for example batch_records that counts the amount of records that this batch is processing. To check now if the batch is doing nicely I want to compare the amount of records with the amount of records with the previous runs. For that I choose the interquartile range and if a value is outside the range I want to throw an alert.
I have found the quantile function in PromQL but I don't now how to compare the current amount of records with the amount of records from all previous runs.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
