How to avoid "Error: tsdb.HandleRequest() error Could not find executor for data source type:mydb"

Hello Everyone,

   I found a issue when using datasource plugin with  id "mydb",  when I wanted to create Alert in dashboard and  clicked "Test Rule" button In Alert panel,  i got below error message:

   Error: tsdb.HandleRequest() error Could not find executor for data source type:mydb

 Who knows this issue and can help me to avoid that?   Thanks!

Only specific backend supported datasources (Graphite, Prometheus, InfluxDB, OpenTSDB) support alerting queries as tey are executed by the backend, and external plugins are frontend only.

We are working on backend plugins so external plugins can also provide alerting but this 1-2 months away

Thanks for your response!

And another issue is How to clean alerting scheduler queue, i found there are always 5 rules in queue as below grafana.log, perhaps some alert is corrupted, so how to clean it or check why cause this issue. Thanks!

Thanks for your response!

And another issue is How to clean alerting scheduler queue, i found there are always 5 rules in queue as below grafana.log, perhaps some alert is corrupted, so how to clean it or check why cause this issue. Thanks!

t=2017-09-28T14:56:32+0800 lvl=dbug msg=‚ÄúScheduling update‚ÄĚ logger=alerting.scheduler ruleCount=5
t=2017-09-28T14:56:42+0800 lvl=dbug msg=‚ÄúScheduling update‚ÄĚ logger=alerting.scheduler ruleCount=5
t=2017-09-28T14:56:52+0800 lvl=dbug msg=‚ÄúScheduling update‚ÄĚ logger=alerting.scheduler ruleCount=5
t=2017-09-28T14:57:02+0800 lvl=dbug msg=‚ÄúScheduling update‚ÄĚ logger=alerting.scheduler ruleCount=5
t=2017-09-28T14:57:12+0800 lvl=dbug msg=‚ÄúScheduling update‚ÄĚ logger=alerting.scheduler ruleCount=5
t=2017-09-28T14:57:22+0800 lvl=dbug msg=‚ÄúScheduling update‚ÄĚ logger=alerting.scheduler ruleCount=5
t=2017-09-28T14:57:32+0800 lvl=dbug msg=‚ÄúScheduling update‚ÄĚ logger=alerting.scheduler ruleCount=5
t=2017-09-28T14:57:42+0800 lvl=dbug msg=‚ÄúScheduling update‚ÄĚ logger=alerting.scheduler ruleCount=5
t=2017-09-28T14:57:52+0800 lvl=dbug msg=‚ÄúScheduling update‚ÄĚ logger=alerting.scheduler ruleCount=5
t=2017-09-28T14:58:02+0800 lvl=dbug msg=‚ÄúScheduling update‚ÄĚ logger=alerting.scheduler ruleCount=5
t=2017-09-28T14:58:12+0800 lvl=dbug msg=‚ÄúScheduling update‚ÄĚ logger=alerting.scheduler ruleCount=5
t=2017-09-28T14:58:22+0800 lvl=dbug msg=‚ÄúScheduling update‚ÄĚ logger=alerting.scheduler ruleCount=5
t=2017-09-28T14:58:32+0800 lvl=dbug msg=‚ÄúScheduling update‚ÄĚ logger=alerting.scheduler ruleCount=5
t=2017-09-28T14:58:42+0800 lvl=dbug msg=‚ÄúScheduling update‚ÄĚ logger=alerting.scheduler ruleCount=5
t=2017-09-28T14:58:52+0800 lvl=dbug msg=‚ÄúScheduling update‚ÄĚ logger=alerting.scheduler ruleCount=5
t=2017-09-28T14:59:02+0800 lvl=dbug msg=‚ÄúScheduling update‚ÄĚ logger=alerting.scheduler ruleCount=5
t=2017-09-28T14:59:12+0800 lvl=dbug msg=‚ÄúScheduling update‚ÄĚ logger=alerting.scheduler ruleCount=5
t=2017-09-28T14:59:22+0800 lvl=dbug msg=‚ÄúScheduling update‚ÄĚ logger=alerting.scheduler ruleCount=5
t=2017-09-28T14:59:32+0800 lvl=dbug msg=‚ÄúScheduling update‚ÄĚ logger=alerting.scheduler ruleCount=5
t=2017-09-28T14:59:42+0800 lvl=dbug msg=‚ÄúScheduling update‚ÄĚ logger=alerting.scheduler ruleCount=5
t=2017-09-28T14:59:52+0800 lvl=dbug msg=‚ÄúScheduling update‚ÄĚ logger=alerting.scheduler ruleCount=5
t=2017-09-28T15:00:02+0800 lvl=dbug msg=‚ÄúScheduling update‚ÄĚ logger=alerting.scheduler ruleCount=5
t=2017-09-28T15:00:12+0800 lvl=dbug msg=‚ÄúScheduling update‚ÄĚ logger=alerting.scheduler ruleCount=5

Original Message
Sender:Torkel √Ėdegaardgrafana@discoursemail.com
Recipient:sllinsllin@taosdata.com

torkel Leader
September 28
Only specific backend supported datasources (Graphite, Prometheus, InfluxDB, OpenTSDB) support alerting queries as tey are executed by the backend, and external plugins are frontend only.
We are working on backend plugins so external plugins can also provide alerting but this 1-2 months away
Visit Topic or reply to this email to respond.
To unsubscribe from these emails, click here.

Thanks for your response!

And another issue is How to clean alerting scheduler queue, i found there are always 5 rules in queue as below grafana.log, perhaps some alert is corrupted, so how to clean it or check why cause this issue. Thanks!

Thanks for your response!

And another issue is How to clean alerting scheduler queue, i found there are always 5 rules in queue as below grafana.log, perhaps some alert is corrupted, so how to clean it or check why cause this issue. Thanks!

t=2017-09-28T14:56:32+0800 lvl=dbug msg=‚ÄúScheduling update‚ÄĚ logger=alerting.scheduler ruleCount=5
t=2017-09-28T14:56:42+0800 lvl=dbug msg=‚ÄúScheduling update‚ÄĚ logger=alerting.scheduler ruleCount=5
t=2017-09-28T14:56:52+0800 lvl=dbug msg=‚ÄúScheduling update‚ÄĚ logger=alerting.scheduler ruleCount=5
t=2017-09-28T14:57:02+0800 lvl=dbug msg=‚ÄúScheduling update‚ÄĚ logger=alerting.scheduler ruleCount=5
t=2017-09-28T14:57:12+0800 lvl=dbug msg=‚ÄúScheduling update‚ÄĚ logger=alerting.scheduler ruleCount=5
t=2017-09-28T14:57:22+0800 lvl=dbug msg=‚ÄúScheduling update‚ÄĚ logger=alerting.scheduler ruleCount=5
t=2017-09-28T14:57:32+0800 lvl=dbug msg=‚ÄúScheduling update‚ÄĚ logger=alerting.scheduler ruleCount=5
t=2017-09-28T14:57:42+0800 lvl=dbug msg=‚ÄúScheduling update‚ÄĚ logger=alerting.scheduler ruleCount=5
t=2017-09-28T14:57:52+0800 lvl=dbug msg=‚ÄúScheduling update‚ÄĚ logger=alerting.scheduler ruleCount=5
t=2017-09-28T14:58:02+0800 lvl=dbug msg=‚ÄúScheduling update‚ÄĚ logger=alerting.scheduler ruleCount=5
t=2017-09-28T14:58:12+0800 lvl=dbug msg=‚ÄúScheduling update‚ÄĚ logger=alerting.scheduler ruleCount=5
t=2017-09-28T14:58:22+0800 lvl=dbug msg=‚ÄúScheduling update‚ÄĚ logger=alerting.scheduler ruleCount=5
t=2017-09-28T14:58:32+0800 lvl=dbug msg=‚ÄúScheduling update‚ÄĚ logger=alerting.scheduler ruleCount=5
t=2017-09-28T14:58:42+0800 lvl=dbug msg=‚ÄúScheduling update‚ÄĚ logger=alerting.scheduler ruleCount=5
t=2017-09-28T14:58:52+0800 lvl=dbug msg=‚ÄúScheduling update‚ÄĚ logger=alerting.scheduler ruleCount=5
t=2017-09-28T14:59:02+0800 lvl=dbug msg=‚ÄúScheduling update‚ÄĚ logger=alerting.scheduler ruleCount=5
t=2017-09-28T14:59:12+0800 lvl=dbug msg=‚ÄúScheduling update‚ÄĚ logger=alerting.scheduler ruleCount=5
t=2017-09-28T14:59:22+0800 lvl=dbug msg=‚ÄúScheduling update‚ÄĚ logger=alerting.scheduler ruleCount=5
t=2017-09-28T14:59:32+0800 lvl=dbug msg=‚ÄúScheduling update‚ÄĚ logger=alerting.scheduler ruleCount=5
t=2017-09-28T14:59:42+0800 lvl=dbug msg=‚ÄúScheduling update‚ÄĚ logger=alerting.scheduler ruleCount=5
t=2017-09-28T14:59:52+0800 lvl=dbug msg=‚ÄúScheduling update‚ÄĚ logger=alerting.scheduler ruleCount=5
t=2017-09-28T15:00:02+0800 lvl=dbug msg=‚ÄúScheduling update‚ÄĚ logger=alerting.scheduler ruleCount=5
t=2017-09-28T15:00:12+0800 lvl=dbug msg=‚ÄúScheduling update‚ÄĚ logger=alerting.scheduler ruleCount=5

do to the Alerting list view using Grafana main side nav, there you should see all rules and you can pause them or go to each dashboard and remove them

Yes! It works now ! Thanks!

Hello Torkel,

I try to implement a executor in pkg/tsdb/mydb , rebuild grafana and restart grafana, it looks like alert works well and i receive the Alert mail, but the image does not display nothing(no spark line), Could you please give me your suggesion? Thanks !

Any errors in the Grafana Server log? And when you click on the link in the email, then the graph is working?

Clicked ‚ÄúView Your Alert rule‚ÄĚ Link in mail, in the open window i got ‚ÄúInvalid CORS request‚ÄĚ message. Thanks!

Original Message
Sender:Daniel Leegrafana@discoursemail.com
Recipient:sllinsllin@taosdata.com

daniellee
September 29
Any errors in the Grafana Server log? And when you click on the link in the email, then the graph is working?
Visit Topic or reply to this email to respond.
In Reply To
sllin
September 29
Hello Torkel, I try to implement a executor in pkg/tsdb/mydb , rebuild grafana and restart grafana, it looks like alert works well and i receive the Alert mail, but the image does not display nothing(no spark line), Could you please give me your suggesion? Thanks ! [grafana-1]
Visit Topic or reply to this email to respond.
To unsubscribe from these emails, click here.

No errors found in server log. Thanks!

Hello . Daniel,
below message from server log:

  t=2017-09-29T20:54:27+0800 lvl=info msg="Sending notifications for" logger=alerting.notifier ruleId=9 sent count=1

t=2017-09-29T20:54:27+0800 lvl=info msg=Rendering logger=png-renderer path="dashboard-solo/db/tbase-alert-final?&panelId=1"
t=2017-09-29T20:54:28+0800 lvl=info msg=‚ÄúRequest Completed‚ÄĚ logger=context userId=0 orgId=1 uname= method=POST path=/api/datasources/proxy/6/query status=403 remote_addr=127.0.0.1 time_ms=42 size=20 referer="http://localhost:3000/dashboard-solo/db/tbase-alert-final?panelId=1&refresh=5s&orgId=1"
t=2017-09-29T20:54:28+0800 lvl=dbug msg=‚ÄúImage rendered‚ÄĚ logger=png-renderer path=/var/lib/grafana/png/gqJAoLECU2mzdyW5eZ42.png
t=2017-09-29T20:54:28+0800 lvl=info msg=uploaded logger=alerting.notifier url=

It is either a CORS error or a 403 - Forbidden error. Are you using Proxy or Direct mode for your data source?

Yes, i am using Proxy. I found below server logs:
t=2017-09-30T10:10:34+0800 lvl=info msg=‚ÄúRequest Completed‚ÄĚ logger=context userId=0 orgId=1 uname= method=POST path=/api/datasources/proxy/6/query status=403 remote_addr=127.0.0.1 time_ms=50 size=20 referer="http://localhost:3000/dashboard-solo/db/tbase-alert-final?panelId=1&refresh=5s&orgId=1"
t=2017-09-30T10:10:35+0800 lvl=dbug msg=‚ÄúImage rendered‚ÄĚ logger=png-renderer path=/var/lib/grafana/png/WedSqZiNbmoAKmZwYd7b.png

Image was rendered without data(spark-line). I am not sure the reason. Thank You!

Hello Daniel and Torkel,

Thanks for your support and help! It works well for alert email for my datasource (-:! Grafana is great!

1 Like

Hello Torkel,

When would be implemented alerting feature for simple json data source in grafana ?

We would need to implement backend plugins for Grafana first. Alerting needs to be run on the server. It is on our roadmap but is probably a few months into the future.

Is there any other way so that we can use alert feature of grafana in
simple json data source ?

No, not that I can think of.

Hey,

could you setup a simple example of how to implement alerts on the backend?

I have a simple HTTP/REST datasource implemented in the frontend, but now I need to implement alerts (in the backend :frowning:).

However Go is not one of my best languages and I have no idea what I need to implement in order to make alerts work on my datasource.

thanks!

Can you guys make an example (maybe an extension to this one: https://github.com/grafana/simple-json-datasource) for the people who want to change the backend in order to make the alerts work for their datasources?

Thanks!