blg
November 30, 2022, 8:38am
1
I’m trying to create an alert rule to get notified when a certain backend no longer pushes a value called ‘export_interval’ to the Influx database.
The problem I’m facing is that the following query results in no data:
SELECT last("export_interval") FROM "ABC" WHERE $timeFilter GROUP BY "backend_name", "environment"
If I change last
to count
the result is 720.
SELECT count("export_interval") FROM "ABC" WHERE $timeFilter GROUP BY "backend_name", "environment"
How can there be no last, if there is a count?
I’ve tried all combinations of “Format as” and the three buttons on the right:
yosiasz
November 30, 2022, 8:50am
2
what happens if you try
SELECT last("export_interval") FROM "ABC" WHERE $timeFilter
Does one really need group by when it is last?
blg
November 30, 2022, 8:52am
3
Still “no data” when I remove the "group-by"s. However, I do need them, since I want to see three separate last values, each from a different backend.
1 Like
yosiasz
November 30, 2022, 8:55am
4
what data source is this? influxdb?
blg
November 30, 2022, 9:13am
5
Yes, the data source is influxdb.
grant2
November 30, 2022, 10:42am
6
Can you share the screenshots of your entire alert rule configuration, along with the preview of the output (click the blue Preview alerts button). For example:
A: the non-working LAST query (and separately, the working COUNT query)
B: the reduction or classic condition expression
C: the expression that you are alerting on
blg
November 30, 2022, 11:10am
7
A1:
Non working LAST:
A2: working COUNT
B: I don’t have that yet, as there is no data to reduce.
C: I don’t have that yet, as there is no data to alert on.
blg
December 5, 2022, 9:22am
8
Do you think this is a bug, or do you need more information?