How to troubleshoot Zabbix datasource?

Hi,

I’ve installed Grafana 6.6.1 (and now 6.6.2) along with the Zabbix 3.10.5 plugin. This is to pull metrics from Zabbix 4.4.5. Both are on the same Oracle Linux 7.7 server.

I enabled the Zabbix plugin, then configured the data source. I chose:

  • HTTP Access: Server (default)
  • No Auth selected
  • Zabbix API: Trends enabled, Zabbix version 4.x
  • Direct DB Connection: disabled

The “Save & Test” responds with “Zabbix API version: 4.4.5”, so I know the API URL, username and password are correct.

But trying to pull any metrics or data from the data source fails. Graphs just show “N/A” or “No data”, and pull downs (e.g. “Group” or “Host”) are empty.

I installed the PostgreSQL plugin and configured the data source in order to use the Direct DB Connection. Testing again succeeded, but no metrics as before.

I’ve tried turning debug on in the /etc/grafana/grafana.ini file with:

[log.file]
level = debug
filters = plugins:debug

While that creates many entries in /var/log/grafana/grafana.log with a lvl=dbug tag, I don’t see anything in that log to help troubleshoot why the data source connects to Zabbix, but can’t pull back any metrics.

I also attempted to debug Zabbix, but there was nothing I could find in its logs relating to “API” or “Grafana”.

Anyone know what else I can do to troubleshoot this?

Thanks,
Rich

p.s. This has been working fine on my existing Grafana 5.0.4 / Zabbix plugin 3.9.0 / Zabbix 3.2.11 setup. I’m needing to replace that server, so new versions.

So, with no replies here, I kept troubleshooting. The documentation at https://alexanderzobnin.github.io/grafana-zabbix/configuration/ says:

Also check user’s permissions in Zabbix if you can’t get any groups and hosts in Grafana.

But it doesn’t give any references to what those permissions should be. I had the Grafana API user in Zabbix created as a “Zabbix User” in the “No access to the frontend” user group. To troubleshoot, I created the “Getting list of hosts” perl script from Getting started with Zabbix API - Zabbix Blog Running it, I got:

Authentication successful. Auth ID: blahblahblahyaddayaddayadda
List of hosts

It authenticated, but no Zabbix info returned. That is exactly what Grafana is showing me! It seemed like it was the API user permissions. Turns out that I had created host groups in Zabbix, but had not granted any read access to those groups to the “No access to the frontend” user group that the Grafana API user is in . Once I did that, my Grafana dashboards started pulling back data from Zabbix.

Problem solved.

Rich

Hi Rich,

I had a similar problem, once my Grafana upgraded to version v6.6 I am seeing this error message to my existing zabbix datasource
image
and even though the API user has super admin access.

Can you help me in fixing this issue, datasources are working earlier before upgrade.

I’m not sure, did you solved this problem? I also founded this issue.

In my case, zabbix-agent has not proper setup in client side, I can found error in /var/log/zabbix/zabbix_agent.log.

So I have corrected config by enter Zabbix IP server in /etc/zabbix/zabbix_agentd.conf instead of 127.0.0.1.

Great points to investigate are:
/var/log/zabbix/zabbix_agent.log
/var/log/zabbix/zabbix_server.log