How to Integrate Zabbix with Prometheus Using Node_exporter: Step‑by‑Step Guide
Learn how to combine Zabbix and Prometheus by deploying Node_exporter, configuring systemd, creating Zabbix templates, HTTP proxy items, and Prometheus pattern items, enabling seamless monitoring of server metrics without fully replacing your existing Zabbix setup.
Introduction
Prometheus is widely used for cloud‑native monitoring. Zabbix 4.2+ can ingest Prometheus metrics using the built‑in Prometheus pattern feature, allowing a mixed monitoring environment.
1. Deploy Node_exporter
Download the latest Node_exporter release from the official Prometheus download page (https://prometheus.io/download/) and extract it on the target host.
Create a dedicated prometheus system user: useradd prometheus Create a systemd service unit, e.g. /usr/lib/systemd/system/node_exporter.service:
[Unit]
Description=node-exporter service
After=network.target
[Service]
User=prometheus
Group=prometheus
KillMode=control-group
Restart=on-failure
RestartSec=60
ExecStart=/path/to/node_exporter \
--web.listen-address=:9100 \
--collector.systemd \
--collector.systemd.unit-whitelist=(sshd|nginx).service \
--collector.processes \
--collector.tcpstat
[Install]
WantedBy=multi-user.targetReload systemd, start and enable the service:
systemctl daemon-reload
systemctl start node_exporter.service
systemctl enable node_exporter.service
systemctl status node_exporter.serviceVerify the exporter is reachable:
curl http://<em>HOST_IP</em>:9100/metrics2. Node_exporter metric reference
A complete list of metrics exported by Node_exporter is documented in the official repository (https://github.com/prometheus/node_exporter) and in the Prometheus documentation.
3. Integrate Zabbix with Node_exporter
3.1 Create a monitoring template
In Zabbix, create a new template that will contain the items needed to pull Prometheus metrics.
3.2 Define a host macro
Add a macro such as {$HOST_IP} to the template so the same template can be applied to multiple hosts.
3.3 HTTP agent item to fetch raw metrics
Create an item of type HTTP agent with the URL http://{$HOST_IP}:9100/metrics. Set the item to store the raw response text.
3.4 Prometheus pattern items
For each metric you want to monitor, add an item that uses the Prometheus pattern syntax to extract the value from the raw text. Example for memory metrics:
Item key: prometheus.get[{$HOST_IP}:9100/metrics, node_memory_MemTotal_bytes]
Item key: prometheus.get[{$HOST_IP}:9100/metrics, node_memory_MemAvailable_bytes]3.5 Link hosts and test
Assign the template to target hosts, set the macro {$HOST_IP} to the host’s IP address, and confirm that the items become enabled.
3.6 View collected data
Open the “Latest data” view for a host to see the extracted Prometheus metrics alongside native Zabbix items.
Conclusion
By installing Node_exporter, exposing its HTTP endpoint, and using Zabbix’s HTTP agent together with the Prometheus pattern, existing Zabbix installations can collect Prometheus metrics without replacing the monitoring stack.
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
dbaplus Community
Enterprise-level professional community for Database, BigData, and AIOps. Daily original articles, weekly online tech talks, monthly offline salons, and quarterly XCOPS&DAMS conferences—delivered by industry experts.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
