Grafana alerting with ElasticSearch as data source

New to grafana, I am trying to create an alert that sends me a notification when the uptime of a server exceeds the threshold. I have tried a number of queries that works fine on a dashboard but doesn’t seem to work using it as a query for alerting. I searched and found out that alerting only works when the underlying query returns numeric data but I am using metric Logs. Any ideas what to do?

@zakaria123 you can try to modify the query to return a count of the number of log lines that exceed the threshold, then alert on the count returned. For example, you could use a metric aggregation like Value count or sum:

Thank you, I will try that out