首页 > 数据库 > mysql教程 > nagios 监控redis

nagios 监控redis

WBOY
发布: 2016-06-07 16:39:33
原创
1011 人浏览过

安装redis支持 perl -MCPAN -e shell cpan>install Redis 下载check_redis.pl http://exchange.nagios.org/directory/Plugins/Databases/check_redis-2Epl/details https://github.com/willixix/WL-NagiosPlugins 测试 ./check_redis.pl -H 192.168.0.130 -p

安装redis支持
perl -MCPAN -e shell
cpan>install Redis

下载check_redis.pl

http://exchange.nagios.org/directory/Plugins/Databases/check_redis-2Epl/details

https://github.com/willixix/WL-NagiosPlugins

测试
./check_redis.pl -H 192.168.0.130 -p 6379 -a ‘connected_clients,blocked_clients’ -w ~,~ -c ~,~ -f

OK: REDIS 2.6.12 on 192.168.0.130:6379 has 1 databases (db0) with 49801 keys, up 3 days 14 hours - connected_clients is 1, blocked_clients is 0 | connected_clients=1 blocked_clients=0
登录后复制

commands.cfg添加

define command {    
        command_name	check_redis    
        command_line	$USER1$/check_redis.pl -H $HOSTADDRESS$ -p $ARG1$ -a $ARG2$ -w $ARG3$ -c $ARG4$ -f
	}
登录后复制

加入主机监控

define service{
        use                             local-service         ; Name of service template to use
        host_name                       c1gredis
        service_description             redis
	check_command			check_redis!6379!'connected_clients,blocked_clients'!~,~!~,~
	notifications_enabled		0
        }
登录后复制

重新载入配置。

/etc/init.d/nagios reload

参考:
http://exchange.nagios.org/directory/Plugins/Databases/check_redis-2Epl/details
http://www.ttlsa.com/nagios/nagios-redis-monitor/
http://bbs.linuxtone.org/thread-6241-1-1.html

Related Posts

相关标签:
来源:php.cn
本站声明
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn
热门教程
更多>
最新下载
更多>
网站特效
网站源码
网站素材
前端模板