I have some IoT devices connected to a server being monitored by Prometheus. I have it configured in a way that whenever a device shuts it sends an alert. But right now, whenever a device goes offline the alert manager is sending alert of all the devices which are offline and not a single device at a time.
ALERT IoT_online
IF IoT_online == 0
LABELS {severity="critical"}
ANNOTATIONS {description="This device is offline {{ $value }}.", summary="Instance {{ $labels.instance }} IoT device is offline"}
I just want it to send alerts of the only device which went offline at that particular time. Help Please...