Hi,
I have an SQL table (SQLite) tracking memory usage for about 100 servers. I am trying to create a simple alert that checks each server and fires if its latest memory value is above 90.
The problem is that my servers do not write data at the exact same minute.
My Data Example:
| Time | Server | Memory_Utilization |
|---|---|---|
| 2026-06-02 09:28:00 | Server-3 | 40 |
| 2026-06-02 09:30:00 | Server-1 | 55 |
| 2026-06-02 09:31:00 | Server-2 | 42 |
| 2026-06-02 09:40:00 | Server-1 | 95 |
The Issue:
Because Server-1 has a newer row (09:40) than Server-2 and Server-3, Grafana gets confused.
When I use a Reduce expression (Last), it returns null for all the other servers because they don’t have a row at 09:40. This breaks the Threshold expression, and Grafana immediately triggers a false alert for all 100 servers at once (100 Firing).
How can I create an alert that just looks at the last available row for each server independently, without caring that the timestamps don’t match?
Thanks!