Alert not triggering

Hi, I’m trying to set up alerts, using nrql. This works when triggering an alert, for eg:
(Query returns a value above 0 at least once in 1 min).
But what I can’t get right is to generate an alert if a function is not running for a certain amount of time.
Query: SELECT count(
) FROM Log WHERE application = ‘DataRetentionFunction’
Settings: Query returns a value equal to 0 for at least 5 minutes.
I have tried a few variations, but nothing seems to work

It is also strange that the critical violation zone of the graph doesn’t ‘reset’ when my function runs.

I tried the following
Query:SELECT count(*) FROM Log WHERE environment=‘Dev’ AND application = ‘DataRetentionFunction’
Settings: When the Sum of query results is equal to 0 at least once in 5 minutes

There is an alert, but only after the function is switched back on, not when it enters the “violation zone”

Hi Jacques

Thanks for your patience. I’ve spoken to our internal teams and the reason it’s currently not working is that our alert system won’t data points flowing to it when there are no “logtype = ‘ERROR’” events. Which means the count function won’t be triggered.

The good news is that you can set-up our Loss of Signal functionality: This will trigger when no data arrives for x minutes. Keep in mind this functionality is only available for static alerts.

Hope this helps. Please let me know if you have any other questions.

Thanks for your reply.
I made my question confusing by mentioning the “logtype = 'ERROR’” query, that was just an example of a policy working.
The query which doesn’t work is
SELECT count(* ) FROM Log WHERE application = ‘DataRetentionFunction’
Settings: When the Sum of query results is equal to 0 at least once in 5 minutes

I would expect this cause an alert if no logs are received from this application for >5 minutes, but it doesn’t.

So I tried the Signal Lost Alert on this query, and it does seem to work, so I am happy.

It still seems strange that the alert was not triggering, and I’ve seen other posts with the same problem. eg this issue

Thanks Jacques

Thanks for the update @jacques.vandenmunckh! I’m glad to hear you found a work around for your issue. If you have any further questions or issues, please do not hesitate to update the thread :slightly_smiling_face: