Grafana and Zabbix plugin issue

  • What Grafana version and what operating system are you using? Grafana version: v13.0.2, Ubuntu 26.04

  • What are you trying to achieve? Trying to add Zabbix as a data source for dashboards

  • How are you trying to achieve it? Setting up a new data source, clicking the “save and test” button never completes. If i attempt to add a dashboard widget and select the zabbix data source, it times out.

  • What happened? See above

  • Did you receive any errors in the Grafana UI or in related logs? If so, please tell us exactly what they were. from the grafana/zabbix plugin log: logger=plugin.alexanderzobnin-zabbix-datasource t=2026-06-11T13:08:49.131701973Z level=error msg=“Partial data response error” pluginVersion=6.4.0 uname=admin dsName=alexanderzobnin-zabbix-datasource pluginId=alexanderzobnin-zabbix-datasource refID=A status=408 statusSource=downstream dsUid=efotdz8fi3chsf endpoint=queryData error=“query timeout: Query execution exceeded maximum allowed time (1m0s). Query was automatically terminated to prevent excessive resource consumption.”
    logger=plugin.alexanderzobnin-zabbix-datasource t=2026-06-11T13:08:49.132162044Z level=error msg=“Plugin Request Completed” statusSource=downstream uname=admin dsName=alexanderzobnin-zabbix-datasource dsUid=efotdz8fi3chsf duration=1m0.001197991s endpoint=queryData pluginId=alexanderzobnin-zabbix-datasource pluginVersion=6.4.0 status=error
    logger=plugin.alexanderzobnin-zabbix-datasource t=2026-06-11T13:12:01.631909184Z level=info msg=“Plugin Request Completed” dsName=alexanderzobnin-zabbix-datasource dsUid=efotdz8fi3chsf duration=15.892501ms pluginId=alexanderzobnin-zabbix-datasource statusSource=plugin endpoint=callResource pluginVersion=6.4.0 status=ok uname=admin".

  • Zabbix server is brand new, started this week. Resources are fine, CPU usage usually around 8% and 80% free memory.

Your error is a query timeout → the plugin hit the default 1 minute execution limit. Fix these two things first:

1 → Increase query timeout:
Grafana → Zabbix data source → Additional settings → Query Timeout → set to 300

2 → Enable Trends:
Additional settings → Trends → Enable Trends → set After to 7d

If still timing out, check which setup applies to you:

If running on bare Ubuntu:
Run systemctl status zabbix-agent and confirm agent is running
Check Zabbix UI → Monitoring → Hosts → Zabbix server → Interfaces → confirm agent IP is correct

If running in Docker:

  • Run docker ps and confirm these 3 containers are running: zabbix-server, zabbix-agent, zabbix-web

  • If zabbix-agent is missing:
    docker run -d --name zabbix-agent --network <your-zabbix-network> -e ZBX_HOSTNAME="Zabbix server" -e ZBX_SERVER_HOST="zabbix-server" zabbix/zabbix-agent2:latest

  • If agent is running but still timing out: Zabbix UI → Monitoring → Hosts → Zabbix server → Interfaces → clear IP → set DNS name to zabbix-agent → Connect to DNS → Update

  • Confirm Grafana is on the same Docker network: docker network connect <your-zabbix-network> <your-grafana-container>

  • Set data source URL to: http://zabbix-web:8080/api_jsonrpc.php

After all fixes Save & Test should show Zabbix API version and data will appear in your panels.

Hey, thank you for the reply! I have tried with the settings you suggested, but it still hangs - I have noticed in zabbix itself it reports its CPU utilization as anywhere between 30 and 90% while this runs - if i close/refresh the page it drops. the vm is running on bare ubuntu, everything is running as it should, i’ve rebooted a couple of times and rechecked but it’s always the same. if i run top on the vm, i’ll see instances of mysql and php at the top of cpu utlization, but its never really maxed out - VM is is equipped with 4cpu and 8gb ram.

Thanks for the update. The timeout is being caused by high MySQL CPU load when Grafana queries Zabbix.

1 → Enable Trends (most impactful):
Zabbix data source → Additional settings → Trends → Enable Trends → set After to 7d
This uses pre-aggregated data instead of raw history — dramatically reduces MySQL load

2 → Narrow your default time range:
Set dashboard default time range to Last 1 hour instead of Last 6 hours
Wider time ranges = more MySQL rows = higher CPU

3 → Enable Direct DB Connection:
Zabbix data source → Additional settings → Direct DB Connection → Enable
This bypasses the Zabbix API entirely → faster on wide time ranges
You need to configure a MySQL data source in Grafana first → the plugin needs only read access to history, history_uint, trends and trends_uint tables

4 → Check MySQL slow queries:

bash

sudo mysql -u root -p -e "SHOW VARIABLES LIKE 'slow_query_log%';"

If slow_query_log = ON, tail the log path shown → it will show exactly which queries are spiking CPU.

Hey, thank you for the reply! So, trends have been enabled with no change, i usually have the dashboards set to 1hr that i can see, it never completes, I have setup a mysql db connection, this saves and tests succesfully almost instantly, i added it to the zabbix plugin, but i get the same issue, it hangs on saving and testing and nothing ever loads in the dashboard, it seems it’s still reliant on the zabbix plugin. I’ve enabled slow queries and tailed the log while it runs, the only clue that has given is that there were 600k+ session records on the database. I cleared them down to the last 5 minutes, ran save and test and sure enough the session count starts rising again immediately. i’m not a db expert, claudeai is helping me out but it seems like the plugin is hammering the api and causes it to grind to a halt

So with a bit more help from Claude, the solution was:

  1. OPcache disabled — was causing empty API responses
  2. Apache Authorization headerSetEnvIf Authorization "(.*)" HTTP_AUTHORIZATION=$1 — Apache was stripping the auth header before it reached PHP
  3. API token instead of username/password — prevented the sessions table from flooding with hundreds of thousands of records and grinding MySQL to a halt

Hi @jamesw6

This is probably a bug.

It was reported in this issue:

An alternative is to reinstall an older version of the plugin.

grafana-cli plugins install alexanderzobnin-zabbix-app 6.3.0 systemctl restart grafana-server