grafana / grafana-zabbix

Zabbix plugin for Grafana dashboard
http://play.grafana-zabbix.org
Apache License 2.0
2.06k stars 458 forks source link

400 error after update #1360

Open B3DTech opened 2 years ago

B3DTech commented 2 years ago

Describe the bug Just updated Grafana and the plugin, and now I get a 400 error querying Zabbix, with no changes to Zabbix itself. Just did the update and attempted to view dashboards and they are all failing with 400 errors.

msg="Request Completed" logger=context userId=1 orgId=1 uname=admin method=POST path=/api/ds/query status=400 remote_addr=10.85.149.93

I can run a curl from the server console and get a valid response: curl --location --request POST 'http://monitoring/zabbix/api_jsonrpc.php' --header 'Content-Type: application/json' --data '{"jsonrpc":"2.0","method":"apiinfo.version","id":1,"auth":null,"params":{}}'

{"jsonrpc":"2.0","result":"4.4.10","id":1}

I can curl using the user/password, get the auth token, and successfully pull data from Zabbix as well.

Expected behavior Queries would work.

Network data Zabbix and Grafana live on the same server. Grafana on port 3000, Zabbix through httpd without a port. This has worked since I set it up about 5 years ago.

Software versions

Grafana Zabbix Grafana-Zabbix Plugin
8.3.3 4.4.10 4.2.4.
romainsi commented 2 years ago

Hi,

Same here with no access to query (test configuration plugin and mysql is correct) :

Capture

Grafana | Zabbix | Grafana-Zabbix Plugin -- | -- | -- 8.3.3 | 5.4.8 | 4.2.4.
JSuenram commented 2 years ago

Duplicate of https://github.com/alexanderzobnin/grafana-zabbix/issues/1358

jameskirsop commented 2 years ago

I'm not sure this is a direct duplicate of #1358, @JSuenram. The symptoms look a little different (eg. I'm not seeing the same output in the browser/web inspector console that the OP is in the other Issue, but I am seeing the same 400 error reported above here).

I've upgraded to the latest version of both Grafana and this plugin and am still experiencing problems.

Part of my issue appears to be that (successful) calls to /api/ds/query return empty results like

{
    "results": {
        "A": {
            "frames": []
        },
        "B": {
            "frames": []
        },
        "C": {
            "frames": []
        },
        "D": {
            "frames": []
        }
    }
}

and that's only when I get a result at all - much of the time I'm just seeing 400 errors in the Grafana logs.

alexanderzobnin commented 2 years ago

Hi! Could you try to tests against another Zabbix instance? Could you try curl with --data '{"jsonrpc":"2.0","method":"apiinfo.version","id":1,"params":{}}' (this is exactly what updated version sends)?

jameskirsop commented 2 years ago

@alexanderzobnin do you have a public facing test Zabbix instance we could test against? I don't currently have one I can use.

github-actions[bot] commented 1 month ago

This issue has been automatically marked as stale because it has not had activity in the last 2 years. It will be closed in 60 days if no further activity occurs. Please feel free to leave a comment if you believe the issue is still relevant. Thank you for your contributions!