nagios 监控redis

安装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

  1. 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添加

  1. define command {   
  2.         command_name check_redis   
  3.         command_line $USER1$/check_redis.pl -H $HOSTADDRESS$ -p $ARG1$ -a $ARG2$ -w $ARG3$ -c $ARG4$ -f
  4. }

加入主机监控

  1. define service{
  2.         use                             local-service         ; Name of service template to use
  3.         host_name                       c1gredis
  4.         service_description             redis
  5. check_command check_redis!6379!'connected_clients,blocked_clients'!~,~!~,~
  6. notifications_enabled 0
  7.         }

重新载入配置。

/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

  • cacti 安装npc 整合 nagios ( 2010-07-15)
  • 使用NDOUtils将Nagios监控信息存入mysql ( 2009-05-27)
  • Nagios 定义hostescalation控制报警频率 ( 2009-05-25)

你可能感兴趣的:(Nagios,redis)