I would like to create an alert if a Windows service is down. I have the following query I’m getting via MS SQL: select ServiceName, Status, TimeUTC as 'time' from ServicesStatus
where Status returns either 0 (down) or 1 (up).
The furthest I managed to get is to trigger an alert on avg() if it goes below 1, but couldn’t figure out how to expose in the alert message which ServiceName has a Status value of 0.
Ideally, I would like to build an alert message template like this: “Service {ServiceName} is down for the last 5 minutes”.
I do use NGAlerts and its working now as you suggested.
Took me a while though to realize that classic conditions are not working with message variables, so I used a math expression instead ($B < 1).