Install Grafana and connect it to Zabbix
Zabbix collects host metrics. Grafana reads them through the Zabbix API and displays them in dashboards.
This guide installs Grafana on Debian 13 with Docker Compose and connects it to an existing Zabbix server.
The example uses a read-only Zabbix token and builds a CPU chart.
Prepare Docker and Zabbix
Install Docker and Compose on Debian 13. For example, use Zabbix 7.0 LTS with a monitored Linux host. In Monitoring → Latest data, confirm that the host reports a CPU metric.
- The API is served by the Zabbix web frontend. The example uses https://zabbix.example.org/zabbix/api_jsonrpc.php. If the frontend is at the web root, remove /zabbix from the path.
- The Grafana container must be able to resolve and reach the name. If Zabbix also runs in Docker, use a shared Docker network and the Zabbix frontend service name, or an HTTPS URL reachable from the container.
Create the Grafana Compose file
Create ~/grafana and put the following in compose.yaml. The volume keeps settings, dashboards and plugins when the container is recreated.
compose.yamlservices: grafana: image: grafana/grafana-enterprise:13.3.1-ubuntu restart: unless-stopped ports: - "127.0.0.1:3000:3000" environment: GF_PLUGINS_PREINSTALL: alexanderzobnin-zabbix-app@6.10.3 volumes: - grafana_data:/var/lib/grafana volumes: grafana_data:Start Grafana and enable the plugin
In ~/grafana, validate the Compose file and start the service. The plugin installs in the background during startup. Wait for it to appear in Grafana.
- Open http://127.0.0.1:3000 on the server. From your computer, run ssh -N -L 3000:127.0.0.1:3000 user@SERVER_IP and then open the same URL locally.
- On a fresh install, sign in with admin / admin and change the password immediately. Go to Administration → Plugins and data → Plugins, open Zabbix and click Enable.
Terminalsudo docker compose config --quiet && sudo docker compose up -d sudo docker compose logs --tail=80 grafanaCreate a read-only Zabbix token
In Zabbix, create a Grafana Read user group and grant it Read access only to the host groups you intend to display. Add a dedicated account with a User-type role that can access the API.
- Under Users → API tokens, generate a token for that account, set an expiration and store the secret in a password manager.
- The token inherits the account’s permissions. Use the dedicated account for this connection.
Add the Zabbix data source
In Grafana → Connections → Add new connection, find Zabbix and add the data source. Enter the full api_jsonrpc.php URL. Under Zabbix Connection, select API token and enter the secret.
- Leave Direct DB Connection off for this first test. Click Save & test. Confirm that Grafana can connect before building a panel.
- A 404 often means the path is wrong. For a timeout, check DNS, routing and firewall access from Grafana’s network. For a TLS error, use a certificate trusted by Grafana.
- For authentication errors, check the token and role. With Zabbix 7, also verify that the reverse proxy passes the Authorization header to the API.
Create a CPU dashboard
In Dashboards → New → New dashboard → Add visualization, select the Zabbix data source and the Metrics query type.
- Select the host group, Linux host and CPU metric confirmed in Latest data. Select Time series, a 6-hour range and the Percent (0–100) unit if Zabbix returns a percentage.
- Save the dashboard. If the connection works but the host list is empty, review Zabbix group permissions. If only the chart is empty, check the time range and the item values in Latest data.