Zabbix plugin configured but not returning any data

This is almost certainly my missing some key part of setup, but I cannot seem to get any data out of Zabbix with the plugin. The plugin is installed and enabled. I have configured it using an API token, and ‘test’ reports successful and shows correct API version 7.0.

I have tried putting appropriate data including wildcards into Group/Host/Tag/Item boxes for either Explorer or creating a graph, or tried leaving them empty. Are they supposed to popup values or just be plain text boxes? Either way, nothing. If I put, say, /.*/ into Group and Host, and ‘CPU utilization’ into Item I’d expect it to do something but I just get ‘No data’. I’ve imported the test dashboards. They just show N/A or blank (and the deprecated Angular warning)

So far this is just a test Zabbix setup, with a couple of Windows and Linux hosts running Agent2 and a couple of other network devices as a proof of concept - could someone let me know a search query that ought to work - the docs for the plugin seem a little outdated as far as names for the input fields go, so it’s possible I’m putting the wrong thing in the wrong place.

Grafana 11.1.0 running as a Docker container (latest tag) on Ubuntu 22.04 host
Zabbix 7.0.0 running as a Docker container (alpine-7.0-latest tag) on Ubuntu 20.04 host configured to use host network mode, mysql variant
Zabbix plugin 4.5.2

As an example, I’m using something like this as query fields:

I’ve also tried capturing network traffic between Grafana and Zabbix host if I click ‘run query’ with those parameters, and as far as I can tell it doesn’t pass them along:

POST /api_jsonrpc.php HTTP/1.1
Host: w***.uk:8081
User-Agent: Grafana/grafana-zabbix
Connection: close
Content-Length: 63
Content-Type: application/json
Accept-Encoding: gzip

HTTP/1.1 200 OK
Date: Wed, 10 Jul 2024 10:21:39 GMT
Server: Apache/2.4.61 (Unix)
X-Powered-By: PHP/8.3.9
Access-Control-Allow-Origin: *
Access-Control-Allow-Headers: Content-Type
Access-Control-Allow-Methods: POST
Access-Control-Max-Age: 1000
Content-Length: 41
Connection: close
Content-Type: application/json

have you tried the grafana zabbix play site, just to see what other people are doing?

Thanks for the pointer - I meant to do that, and then completely forgot.
So that is working very differently. It pops up prompts for the various inputs, which my install does not. The play site is running Grafana 10.1 so perhaps something is broken with 11.1, I will do some testing there.

Same with 10.1 as 11.1. Searching more, I found this thread from a few years ago which exactly describes what I’m experiencing: How to troubleshoot Zabbix datasource?

Assuming the solution here is to do with permissions, I’ve tried various things with mixed success. I’ve tested moving the API user into the Zabbix Administrators group so it should have access to all host/template groups - it does now see problems if in explore mode I change the drop-down from Metrics to Problems, while before it just showed 0 results. But even with that I still don’t get it populating the fields or returning data in the Metrics query.

Has anyone else solved this, or know of some other permission that needs to be set? The user has API permission and for the purposes of testing, has Admin role and is in the Administrators user group.

Try carrying out a test… instead of using the token, use the zabbix admin username and password.


OK, Making some headway here.
Thanks for the suggestion - it worked which led me into some new tests:

For the plugin to talk to Zabbix, it seems to need to have the Zabbix ‘Super admin role’ assigned, not even a regular ‘Admin’ role is sufficient.

Making the change in Zabbix and just reloading the Grafana page also didn’t seem to be enough, I also needed to go into the Zabbix datasource and ‘save and test’ again, even without making any changes - after that it would work as intended. If you don’t do that step to edit the datasource then it doesn’t seem to pick up the change in permissions on the Zabbix side.

Is there anywhere a list of what permissions are needed? I’d prefer not to have my Grafana dashboard account needing full Super Admin privileges to the entirety of Zabbix - preferably just read access to the metrics ought to be enough?

The user does not need to have superadmin permission on zabbix, it can be a user with a lower level of permission…, but he needs to have read permission on the hosts/hostsgroups.

You can do a test, create the user in zabbix and then log in to the zabbix frontend to validate if you can view the hosts, if you can view them, grafana will also be able to.

Yes, thanks - I figured it out over lunch and started writing a reply but you beat me to it.
Yes, it’s not the permissions from the role, but the host or template permissions that were the cause. I created a new role with user permissions, and created a user group with read access to all hosts and templates, and a user with those is able to access the Zabbix metrics from Grafana.

Thanks for your help and nudges in the right direction, got there in the end!