配置Cacti 0.8.8a監控Memcache

配置Cacti 0.8.8a監控Memcache

系統:CentOS 6.3 x86_64

一、安裝memcache客戶端API

1、解決依賴關係

可以使用yum來安裝

[root@message3 ~]# yum -y install python python-setuptools

2、下載安裝

ftp://ftp.tummy.com/pub/python-memcached/下載最新版本

[root@message3 ~]# wget ftp://ftp.tummy.com/pub/python-memcached/python-memcached-1.53.tar.gz

[root@message3 ~]# tar xf python-memcached-1.53.tar.gz

[root@message3 ~]# cd python-memcached-1.53

[root@message3 python-memcached-1.53]# python setup.py install

[root@localhost ~]# tar xf python-memcached-1.48.tar.gz

[root@localhost ~]# cd python-memcached-1.48

[root@localhost python-memcached-1.48]# python setup.py install

二、下載安裝數據收集腳本和模板

http://dealnews.com/developers/cacti/memcached.html下載最新版本

[root@message3 ~]# tar xf cacti-memcached-1.0.tar.gz

[root@message3 ~]# wget http://s31.dlnws.com/dealnews/developers/cacti-memcached-1.0.tar.gz

[root@message3 ~]# cd cacti-memcached-1.0

[root@message3 cacti-memcached-1.0]# cp   memcached.py  /var/www/html/cacti/scripts/

2、通過瀏覽器訪問cacti導入cacti_memcached_host_template.xml文件,需要在本機也要下載這個包。選擇文件,選擇cacti_memcached_host_template.xml。

注意:如果你的memcached的端口不是默認的11211端口則需要修改執行腳本的命令,如圖

點擊Data Input Methods 選擇的Memcached – Statistics

在執行的腳本後邊通過添加 –p 選項來指定你的memcache端口即可,例如我這裏指定的1111端口

三,監控memcached服務器,需要在device中添加,選擇memcached模板就ok了,詳情參考如果無法出圖,檢查iptables有沒有開放11211端口。

一共可以繪出6張圖。



發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章