A = name of your query. You can also give it a more speaking name in the Query area of the panel.
The Time Series requires you to have a period of time to evaluate if alerts need to be sent. This time period is the period over which you want to do calculations on, which is why many conditions have aggregate functions like
So, when we say
Query(A, 5m, now), it means that we evaluate the alert rule on Query A from 5m ago to now. You can also set alert rules that say
Query(A, 6m, now-1min) to account for a lag in data being inserted in your data source or network latency.
This is important, because if an alert condition uses
Query(A, 5m, now) and there is no data available for
NO DATA alerts will fire (i.e., there isn’t any data with which to evaluate the rule).
You’ll want to select a time interval to evaluate your aggregate function that’s greater (longer) than the time period in which you add new data to the graph that’s triggering your alerts.
Example: We scrape the database every 10 seconds. If we set an alert rule like
Query(A, 5s, now), we’d end up getting
NO DATA alert states constantly, because our data is not that fine grained.