I try to create a azure alert rule which should be triggered in case my service do not log anything.
I created a query to check if my service logs something. This works fine until there are no logs in the specified time (e.g. give the provided query a filter criteria for the timestamp).
Query: customEvents | where name == 'ShouldBeLoged' | limit 1
This query will just give me the query result: No results found from the last 24 hours.
If create a alert of this query the alert view shows me this (see picture):
Has someone an idea how I could achieve that the alert is triggered in case the service do not log anything?
Here I am fetching the one Limit value of custom event.
Create alert with threshold if it less than 1 mean it will fire the alert
Here the query we used to fetch the single custom event.
We fetch single custom event, so we check the threshold value is less than 2 (it will fire if the event values is less than 2).