Error when using Azure Monitor datasource in Grafana 8 Alerts

Hi everyone,

First post on this topic. I hope the information is detailed enough :slight_smile:

  • What Grafana version and what operating system are you using?
    Grafana 8.2.2 on Ubuntu 18.04.6 LTS. Installed through apt-get. Grafana 8 alerts are enabled. Configured Azure Monitor datasource. Confirmed working (I can use the datasource in a dashboard)

  • What are you trying to achieve?
    I’m trying to create a new Grafana Managed alert via Alert Rules → New Alert Rule

  • How are you trying to achieve it?
    Alert Rules → New Alert Rule

  • Rule name: ‘Test’
  • Rule type: Grafana managed alert
  • query A
    – datasource: Azure Monitor
    – time range: now-10m to now
    – Service: Logs
    – Resource:
    – query:
    | where $__timeFilter(TimeGenerated)
    | where CounterName == “% Processor Time”
    | summarize avg(CounterValue) by bin(TimeGenerated, 5m), Computer
    | order by TimeGenerated asc
    (This is the exact same query as used in the dasboard. In the dasboard it works)
  • What happened?
    As soon as the Azure Monitor datasource is selected in the query step above, an error pop up.

  • What did you expect to happen?
    I expected to see the exact same table as in the dashboard

  • Can you copy/paste the configuration(s) that you are having problems with?
    See the How step

  • Did you receive any errors in the Grafana UI or in related logs? If so, please tell us exactly what they were.
    ‘Error’ ‘Failed to evaluate queries and expressions: failed to execute conditions: failed to execute query A: no handler found for query type ‘’’

  • Did you follow any online instructions? If so, what is the URL?
    Unfortunately, couldn’t find any

I have exactly the same problem with Grafana 8.2.1 !! :sob:

Same error using Grafana 8.1.0 via kube-prometheus-stack in AKS. I’m able to get the metric from Explore page, but not from the alert rules.



Running on the main branch for Grafana (with work in progress for version 8.3) and it works for me. Though there is something wrong with the error handling - every error results in the “no handler found for query type” message. And that makes it harder to see what is wrong.

Here is your query running:

The error I ran into was that I had picked the wrong resource in the resource picker and it looks like you haven’t picked a resource?

Hi @daniellee Can you see if you can reproduce the issue that I reported with Metrics. I’m not constructing the query myself, just selecting the value from drop down.

Seems like we found the reason and raised an issue in GitHub

Link: Grafana Azure Monitor | failed to execute query A: no handler found for query type · Issue #41001 · grafana/grafana · GitHub

I think you have to choose subscriptions, when you want to take logs and show to dashboard.
Example: You will want to take WAF logs how many request your WAF blocked and how many allowed. You can do it subscriptions ----> Resource Group name ------> Load balanced (Application gateway) name, and put your query.
For me, works well.
Good luck )))).