simPod/GrafanaJsonDatasource

Failed to evaluate queries and expressions: failed to execute conditions: plugin unavailable

bestboylm opened this issue · 9 comments

Hello
I get a error when I use this data source plugin
error

it is normal in explorer, but when I want to create an alert rule, I get this API ERROR
explorer正常查询

There are related error prompts in the logs in grafana , and my plugin service doesn't receive any new requests
t=2022-03-08T18:16:30+0800 lvl=eror msg="API error" logger=context userId=1 orgId=1 uname=admin error="Failed to evaluate queries and expressions: failed to execute conditions: plugin unavailable" remote_addr= t=2022-03-08T18:16:30+0800 lvl=info msg="Request Completed" logger=context userId=1 orgId=1 uname=admin method=POST path=/api/v1/eval status=400 remote_addr= time_ms=2 size=23 referer="https://mygrafana/grafana/alerting/new?returnTo=%2Falerting%2Flist"

I did not find a corresponding solution!

Grafana Version: 8.3.4
JSON: 0.4.1

Thanks in advance

Try to use Client instead of Server in datasource settings in order to be able to better debug your api.

Try to use Client instead of Server in datasource settings in order to be able to better debug your api.

This API error still exists when I change the data source settings, and use Browser.
This seems to be Grafana's error, but I'm not sure.
image

Something is wrong with you api. Switching to Browser can only help you debug it in your browser since you can see the pure request grafana client makes to your backend.

my data source service doesn't get request info when I click "Run queries" in the create alert rule interface.
request just send to the Grafana, and get this status 400 API error.
image

The data example returned by my data source service:
/search

[
"mem_info",
"cpu_info"
]

/query

[{
'columns': [{
'text': 'time',
'type': 'time'
}, {
'text': 'mem_info',
'type': 'number'
}],
'rows': [
[1646812165138, 33],
[1646812225138, 74],
[1646812285138, 31],
[1646812345138, 62],
[1646812405138, 32],
[1646812465138, 11],
[1646812525138, 75],
[1646812585138, 21],
[1646812645138, 51],
[1646812705138, 35],
[1646812765138, 79],
[1646812825138, 25],
[1646812885138, 84],
[1646812945138, 22],
[1646813005138, 77],
[1646813065138, 80]
],
'type': 'table'
}]

Your backend returns e400 for some reason

Your backend returns e400 for some reason

yes, but I can't get any usefull infomation from grafana's log to locate this problem.

my environment is: Nginx + Grafana
SERVER OS: CentOS7

This issue has been automatically marked as stale because it has not
had recent activity. It will be closed if no further activity occurs.

This issue has not seen any activity since it was marked stale.
Closing.