應用背景:
網上監控ceph集群的資料不算多,git上有個開源的監控項目,是跟zabbix結合的,主要包含一個shell寫的腳本和zabbix監控模板,拿來測試小記一下。
開源地址:
https://github.com/BodihTao/ceph-zabbix
測試環境:
一台ceph集群中的ceph-monitor主機(CentOS 7.2)
一台Zabbix Server(CentOS 7.2)
操作步驟:
在ceph-monitor主機上操作
前提1:裝好zabbix-agent,並配好主動模式(ServerActive=IP)
前提2:裝好zabbix-sender,為了把搜集到的數據發送給Zabbix Server
~]# git clone https://github.com/BodihTao/ceph-zabbix.git ~]# cd ceph-zabbix ~]# cp ceph-status.sh /etc/zabbix/scripts/ ~]# crontab -e
# 每分鍾一次 搜集信息的腳本 Zabbix Server 腳本所在的主機名(或者IP) * * * * * /etc/zabbix/scripts/ceph-status.sh 192.168.1.110 ceph-monitor
保存,退出;
在Zabbix Server上操作
1. 在web界面導入ceph-zabbix中的模板zabbix_templates;
2. 添加ceph-monitor主機,並鏈接上導入的模板;
結束.