Operations 5 min read

Monitoring TiDB with Zabbix Server 5.4 – Step‑by‑Step Guide

This article explains how to use Zabbix Server 5.4 to monitor TiDB clusters by configuring HTTP agents, converting Prometheus metrics to JSON, creating custom macros, linking TiDB templates, and verifying data collection, while noting version and OS requirements.

Aikesheng Open Source Community
Aikesheng Open Source Community
Aikesheng Open Source Community
Monitoring TiDB with Zabbix Server 5.4 – Step‑by‑Step Guide

The Zabbix official integration page lists a TiDB monitoring solution that can be applied with Zabbix Server 5.4. The monitoring logic works as follows:

Zabbix Server calls TiDB’s metrics endpoint (e.g., http://127.0.0.1:10080/metrics) via an HTTP agent.

The built‑in Prometheus to JSON feature (available from version 4.2) converts the raw Prometheus data into JSON format.

Using JSONPath, any desired metric—such as the total response time of all queries—can be extracted.

All of these steps are packaged in ready‑made templates, but they require Zabbix ≥ 5.4 and a compatible operating system (Server on RHEL 8/CentOS 8, agents on CentOS 6‑8). Older Zabbix versions have limited compatibility, so for other versions you should use at least 4.2 and manually recreate items, triggers, etc., based on the 5.4 defaults.

Installation

Download and install Zabbix 5.4 following the official documentation (e.g., Zabbix 5.4 download page ).

Adding a Host

Navigate to Configuration → Host and create a new host. Remember to manually add the HTTP‑agent interface shown in the red box of the original UI.

Linking the TiDB Template

Associate the host with the three provided TiDB templates: TiDB by HTTP, TiDB PD by HTTP, and TiDB TiKV by HTTP. Only the components installed on the host need to be linked.

Modifying Macros

Two macros in the template must be customized: {$TIKV.PORT} – set to the actual TiKV port (if the default port is used, no change is needed). {$TIKV.URL} – by default set to localhost; replace it with the real address, e.g., 10.186.64.59:20180/metrics. You can use the built‑in macro {HOST.IP} to automatically insert the host’s IP.

Both macros are defined in the template’s macro section; {$TIKV.URL} must be a concrete value, while {HOST.IP} is resolved automatically.

Viewing Collected Data

Open the Monitoring → Latest data page; if metrics appear for the host, the configuration is successful.

Keywords: TiDB, Zabbix, monitoring.

Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

monitoringOperationsPrometheusTiDBZabbix
Aikesheng Open Source Community
Written by

Aikesheng Open Source Community

The Aikesheng Open Source Community provides stable, enterprise‑grade MySQL open‑source tools and services, releases a premium open‑source component each year (1024), and continuously operates and maintains them.

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.