最新消息:

cacti监控memcached

memcached admin 3326浏览 0评论

使用Cacti监控memcahce的状态,内存使用情况,hit/miss值是多少,利用cacti能够很形象的监控memcache的各个参数。

官方地址:http://dealnews.com/developers/cacti/memcached.html

 

一、安装API Client
# yum -y install python-setuptools
不然在安装python client api时出现下面的错误:
wpid-5ea9cca519f4426c59ee4ad61f34aa92_406832821
下载API Client:
# wget ftp://ftp.tummy.com/pub/python-memcached/python-memcached-1.48.tar.gz
# tar xvf python-memcached-1.48.tar.gz
# cd python-memcached-1.48
# python setup.py install
二、拷贝脚本
下载脚本和模板:
# wget http://s1.dlnws.com/dealnews/developers/cacti-memcached-1.0.tar.gz
# tar xvf cacti-memcached-1.0.tar.gz
# cd cacti-memcached-1.0
# cp memcached.py /var/www/html/scripts   #cacti程序安装在/var/www/html目录
# chown apache.apache /var/www/html/scripts/memcached.py  #apache为httpd启动用户
# chmod +x /var/www/html/scripts/memcached.py
三、导入模板
进入Cacti控制界面点击”Import Templates”–>”Import Template from Local File”,在浏览框中选择cacti_memcached_host_template.xml 这个文件,然后点击”Import”。
如下图:
wpid-5ea9cca519f4426c59ee4ad61f34aa92_3502157701
四、使用模块为memcached主机创建图形
1.关联图形模板
点击”Devices”–>选择memcached服务器–>在”Associated Graph Templates”处选择memcached相关的图形模板,如下图:
wpid-5ea9cca519f4426c59ee4ad61f34aa92_3508678541
2.添加图形
关联图形模板后,在该页面最上方点击”Create Graphs for this Host”按钮,创建图形:
wpid-5ea9cca519f4426c59ee4ad61f34aa92_3508779941
等几分钟后可以查看图形情况:
如:
Memcached缓存使用内存情况:
wpid-5ea9cca519f4426c59ee4ad61f34aa92_3509265421
Memcached命中和流失情况:
wpid-5ea9cca519f4426c59ee4ad61f34aa92_3509594271
Memcached当前连接情况:
wpid-5ea9cca519f4426c59ee4ad61f34aa92_3509912981
Memcached网络使用情况:
wpid-5ea9cca519f4426c59ee4ad61f34aa92_3510486591
Memcached请求情况:
wpid-5ea9cca519f4426c59ee4ad61f34aa92_3510866461

转载请注明:爱开源 » cacti监控memcached

您必须 登录 才能发表评论!