How to Monitor Ceph Clusters with Zabbix: 3 Practical Methods
This guide explains three ways to monitor Ceph distributed storage using Zabbix—Agent2 with the RESTful module, Zabbix Sender, and custom scripts—providing step‑by‑step commands, configuration tips, and troubleshooting notes for reliable operations.
Ceph is an open‑source distributed storage platform; this article introduces three methods to monitor a Ceph cluster with Zabbix, focusing on concepts and commands without detailed configuration.
1. Monitor Ceph with Agent2
Since Zabbix 5.0, Agent2 supports Ceph monitoring via Ceph's RESTful module (listening on port 8003). Enable the module, generate a self‑signed SSL certificate, create an API user, list keys, and test the API with curl. Then configure the Zabbix agent to collect data.
Enable RESTful module
ceph mgr module enable restfulGenerate SSL certificate
ceph restful create-self-signed-certCreate API user
ceph restful create-key zabbixList all API keys: ceph restful list-keys Verify the API user (replace and with actual values):
curl -k https://api:YOUR_TOKEN@<ceph-mgr>:<port>/serverModify the Zabbix Agent2 configuration to skip TLS verification and restart the service:
vim /etc/zabbix/zabbix_agent2.conf
Plugins.Ceph.InsecureSkipVerify=true
systemctl restart zabbix-agent2Data collection works, but the ceph pg dump command is denied, a known issue discussed in Ceph forums.
2. Monitor Ceph with Zabbix Sender
From Ceph Luminous onward, the ceph‑mgr provides a Zabbix module.
Install zabbix‑sender
rpm -Uvh https://repo.zabbix.com/zabbix/5.2/rhel/7/x86_64/zabbix-release-5.2-1.el7.noarch.rpm
yum install zabbix-sender -yEnable Zabbix module
ceph mgr module enable zabbixConfigure Zabbix server and host
ceph zabbix config-set zabbix_host 192.168.2.24
ceph zabbix config-set identifier node1
ceph zabbix config-showImport template and link to host
The template is located at /usr/share/ceph/mgr/zabbix/zabbix_template.xml; import it in Zabbix and attach it to the host.
Test data sending
ceph zabbix sendData appears in Zabbix every 60 seconds.
3. Custom scripts
Shell or Python scripts can invoke Ceph commands or the RESTful API for monitoring; many open‑source examples are available online.
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.
Ops Development Stories
Maintained by a like‑minded team, covering both operations and development. Topics span Linux ops, DevOps toolchain, Kubernetes containerization, monitoring, log collection, network security, and Python or Go development. Team members: Qiao Ke, wanger, Dong Ge, Su Xin, Hua Zai, Zheng Ge, Teacher Xia.
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.
