memcached的监控工具
以前我也是这样去操作的(我安装在VM的UBUNTU下面的)
telnet 192.168.95.130 11211
连接上之后,输入stats,返回如下:
stats
STAT pid 2573
STAT uptime 38
STAT time 1249800188
STAT version 1.2.2
STAT pointer_size 32
STAT rusage_user 0.000000
STAT rusage_system 0.000000
STAT curr_items 0
STAT total_items 0
STAT bytes 0
STAT curr_connections 1
STAT total_connections 2
STAT connection_structures 2
STAT cmd_get 0
STAT cmd_set 0
STAT get_hits 0
STAT get_misses 0
STAT evictions 0
STAT bytes_read 15
STAT bytes_written 7
STAT limit_maxbytes 67108864
STAT threads 1
END
这样不直观也不方便。
参考文章http://www.iteye.com/topic/438722后,也下载了工具Releases%2fMemCacheDManager_1_0_3_0.msi
下载地址:
http://allegiance.chi-town.com/MemCacheDManager.aspx
安装上MemCacheD Manager之后,新建一个Server,点击“Add Server”
然后新建Instance
晕。运来使用这个工具是可以再本机启动多个memcached实例,然后监控起来。应该不能监控我UBUNTU虚拟机上的那个实例。
我本机安装nagios,那么考虑一下其memcached插件试试
下载地址:
http://search.cpan.org/~zigorou/Nagios-Plugins-Memcached-0.02/
下载得到文件:
Nagios-Plugins-Memcached-0.02.tar.gz
解开压缩
tar zxvf Nagios-Plugins-Memcached-0.02.tar.gz
perl Makefile.PL
make
make test
make install
安装成功后,找到nagios配置文件
服务端定义监控memcached命令
/usr/local/nagios/etc/objects/commands.cfg
### check response time(msec) for memcached
define command {
command_name check_memcached_response
command_line $USER1$/check_memcached -H 192.168.95.130 -w 2048 -c 3000
}
### check cache size ratio(bytes/limit_maxbytes[%]) for memcached
define command {
command_name check_memcached_size
command_line $USER1$/check_memcached -H 192.168.95.130 --size-warning 60 --size-critical 80
}
### check cache hit ratio(get_hits/cmd_get[%]) for memcached
define command {
command_name check_memcached_hit
command_line $USER1$/check_memcached -H 192.168.95.130 --hit-warning 40 --size-critical 20
}
重启生效
service nagios restart
对nagios还不了解。没有完全成功。
以前我也是这样去操作的(我安装在VM的UBUNTU下面的)
telnet 192.168.95.130 11211
连接上之后,输入stats,返回如下:
stats
STAT pid 2573
STAT uptime 38
STAT time 1249800188
STAT version 1.2.2
STAT pointer_size 32
STAT rusage_user 0.000000
STAT rusage_system 0.000000
STAT curr_items 0
STAT total_items 0
STAT bytes 0
STAT curr_connections 1
STAT total_connections 2
STAT connection_structures 2
STAT cmd_get 0
STAT cmd_set 0
STAT get_hits 0
STAT get_misses 0
STAT evictions 0
STAT bytes_read 15
STAT bytes_written 7
STAT limit_maxbytes 67108864
STAT threads 1
END
这样不直观也不方便。
参考文章http://www.iteye.com/topic/438722后,也下载了工具Releases%2fMemCacheDManager_1_0_3_0.msi
下载地址:
http://allegiance.chi-town.com/MemCacheDManager.aspx
安装上MemCacheD Manager之后,新建一个Server,点击“Add Server”
然后新建Instance
晕。运来使用这个工具是可以再本机启动多个memcached实例,然后监控起来。应该不能监控我UBUNTU虚拟机上的那个实例。
我本机安装nagios,那么考虑一下其memcached插件试试
下载地址:
http://search.cpan.org/~zigorou/Nagios-Plugins-Memcached-0.02/
下载得到文件:
Nagios-Plugins-Memcached-0.02.tar.gz
解开压缩
tar zxvf Nagios-Plugins-Memcached-0.02.tar.gz
perl Makefile.PL
make
make test
make install
安装成功后,找到nagios配置文件
服务端定义监控memcached命令
/usr/local/nagios/etc/objects/commands.cfg
### check response time(msec) for memcached
define command {
command_name check_memcached_response
command_line $USER1$/check_memcached -H 192.168.95.130 -w 2048 -c 3000
}
### check cache size ratio(bytes/limit_maxbytes[%]) for memcached
define command {
command_name check_memcached_size
command_line $USER1$/check_memcached -H 192.168.95.130 --size-warning 60 --size-critical 80
}
### check cache hit ratio(get_hits/cmd_get[%]) for memcached
define command {
command_name check_memcached_hit
command_line $USER1$/check_memcached -H 192.168.95.130 --hit-warning 40 --size-critical 20
}
重启生效
service nagios restart
对nagios还不了解。没有完全成功。