Hi,
I’m currently working on implementing Grafana for monitoring our infrastructure. One of our goals is to have Grafana send an alert when a device goes down.
Our current setup includes an alert rule that queries an SQL database containing the hosts and their statuses. An alert is triggered when the status is 0.
SELECT
status,
hostname
FROM
devices
The issue arises when multiple hosts are down; it generates multiple alert instances for a single alert, like this:
When this alert appears in Grafana OnCall, we can only acknowledge the entire alert, not the individual instances.
One potential solution is to create a separate alert for each device. However, this approach would require running one SQL query per device, increasing the load on our system.
Is there any other way to have one query that creates a seperate alert per device?