25 Feb 2025
03:18 PM
- last edited on
26 Feb 2025
10:37 AM
by
MaciejNeumann
I'm trying to alert on the host availability state metric of no_data but due to the fact that this metric is not plotted every single minute when there is no data being sent (seems to just be the first minute only), it complicates the alerting I'm trying to do. Is there any log file that is maybe updated when data is being sent so that we can monitor that log file instead and alert if there is no activity being logged in the file?
My current method I am alerting if no values of 'up' are received by toggling the 'alert on missing data' but the problem with that is in situations where the agent is purposely disabled, the alert will trigger OR in situations where the host is decommed the alert will still trigger.
Solved! Go to Solution.
06 Mar 2025 04:00 AM
@sivart_89 Have you tried using the nonempty parameter in DQL? It ensures that you get a result even when no data matches the filter such as "no_data" state as in your case
Here is an example you can refer
I tried it with reboot_graceful which is similar to no_data state and it seems to be giving the expected outcome
timeseries reboot_graceful = sum(dt.host.availability, default:0), nonempty:true, filter:{availability.state == "reboot_graceful"}
Hope this helps