Use the REDIS-CLI command of Redis itself to monitor without using the online PL and PHP plugins.
#!/bin/bashredis_bin= '/home/app/redis/src ' redis_ip= (192.168.1.161 192.168.1.162 192.168.1.163 192.168.1.164) redis_master_port= ' 6379 ' redis_slave_port= ' 6380 ' for ( i = 0; i < 1; i++ ); do alive_master= "$redis _ Bin '/redis-cli -h ' ${redis_ip[$i]} ' -p ' $redis _master_port ' ping ' alive_slave= ' $redis _bin '/redis-cli -h ' ${redis_ip[$i]} ' -p ' $redis _slave_port ' ping ' if [ ' $ALIVE _master ' == ' PONG ' ] && [ ' $ALIVE _slave ' == "PONG" ]; then echo "redis ${redis_ip[$i]} is healthy." exit 0else echo "the redis ${redis_ip[$i]} 6379 or 6380 is down. " exit 1fidone
This article is from the "Echo Xiayun" blog, so be sure to keep this source http://linuxerxy.blog.51cto.com/10707334/1895741
Nagios--check_redis Monitoring Redis