grafanagrafana-alertsobservability

How to set up alerts in Grafana using last() reduce function if the latest value ​change


I'm trying to set up an alert for when the number of successful requests is less than 50% within the last 5 minutes (the order of data processing is indicated in the pictures).

enter image description here enter image description here enter image description here

The problem is that the extreme values ​​for a given interval change within a minute before the next value is obtained, even if I set the interval to -2 minutes. This results in incorrect alerts.

How can I set up alerts taking into account this Grafana feature?


Solution

  • Answer from Grafana Community Forum by @jangaraj:

    Grafana can work only with data obtained from your datasource. So just fix that latency, e. g. scale your ES cluster, so all records are indexed within 2minutes. That’s nothing what you can do, when source data are changing.