Cannot use custom datasource plugin as the datasource when defining the alert query in Grafana 8 alerts

In Grafana v8.0.2 with ngalert feature enabled, I am trying to define an alert rule using a custom datasource plugin I wrote. However when I select the plugin from the list of datasources, and click “Run Queries” I get the following error:
“Failed to evaluate queries and expressions: failed to execute conditions: plugin not registered”

My plugin returns a tabular dataset which is similar to the dataset in the example shown here: Grafana managed alert rules for numeric data | Grafana Labs

I am running Grafana with the following environment variables:
GF_AUTH_ANONYMOUS_ENABLED=true
GF_AUTH_ANONYMOUS_ORG_ROLE=Admin
GF_PLUGINS_ALLOW_LOADING_UNSIGNED_PLUGINS=mycompany-my-plugin
GF_FEATURE_TOGGLES_ENABLE=ngalert

Hi @sahirug

I am not sure what support there is for custom datasources inside NG Alert while it is still behind the feature toggle. Might be worth trying to update to 8.0.6 to see if anything has resolved. I know the alerting squads is pushing changes very quickly…

i have the problem too.
after i running the new create datasource, in the grafana plugins is not there.
seems it’s not register success.
what can i do?
thanks.

Any solution for this yet?
I tried adding a query trough a panel but I got:
“Cannot create alerts from this panel because no query to an alerting capable datasource is found.”

Maybe alerting by custom datasource can be enabled somewhere?

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.