Description
I'm submitting a ...
- [X ] Bug report
- Feature requestdd
- Question / Support request
If you don't send bug report, remove sections below
For bug report please include this information:
Software Versions
Grafana | Zabbix | Grafana-Zabbix Plugin |
---|---|---|
Grafana v5.1.3 | Zabbix 3.9.1 | XXXXX |
What did you do?
Hello actually I'm new with zabbix and I'm trying integrate Zabbix with Grafana, and when I start to create a new Data Source ( the plugin zabbix is enabled) doesn't show the direct and Proxy options ( only the options: Browser (default) and Browser )
after create the connection, the message Could not connect to given url appears.
What was the expected result?
RETURN:
curl -X POST -d '{"jsonrpc":"2.0","method":"apiinfo.version","params":[],"id":1}' -H "Content-Type:application/json" http://IP/zabbix/api_jsonrpc.php
{"jsonrpc":"2.0","result":"3.4.9","id":1}
curl -X POST -d '{"user":"admin","password":"admin"},"id":1}' -H "Content-Type:application/json" http://IP/zabbix/api_jsonrpc.php
{"jsonrpc":"2.0","error":{"code":-32700,"message":"Parse error","data":"Invalid JSON. An error occurred on the server while parsing the JSON text."},"id":null}
What happened instead?
If it relates to metric data visualization would be great to get
- An image or text representation of your metric query
- The raw query and response for the network request (check this in chrome dev tools network tab, here you can see metric requests and other request, please include the request body and request response)
Activity
alexanderzobnin commentedon Jun 19, 2018
Hi! The second request looks wrong:
Data should be like
Are you sure that request is made from plugin?
roberdaniel commentedon May 23, 2019
I resolved it using Invoke-RestMethod instead of Invoke-WebRequest, and now api "understand" my json. (powershell code)
Curl never worked for me. is equivalent to to Invoke-WebRequest.
(I'm in Zabbix 4.2)
MacroJG commentedon Jul 11, 2019
I met the same problem, I add a Zabbix datasource on remote host, then click the "Save & Test" button , show "Could not connect to given url", but I already added a local host zabbix datasource successfuly.


My grafana and zabbix info:
grafana: 10.0.35.19:3000 v6.2.5
zabbix plugin: 3.10.2
zabbix datasource1: 10.0.35.19:8000 v4.2 (OK)
zabbix datasource2: 10.0.35.143:8010 v3.2 (NOK)
MacroJG commentedon Jul 11, 2019
Add zabbix datasource like this:


MacroJG commentedon Jul 11, 2019
Problem resolved !
Just change the HTTP URL from
"http://10.0.35.143:8010/zabbix/api_jsonrpc.php"
to "http://10.0.35.143:8010/api_jsonrpc.php"