Check_redis.pl nagios 使用方法
Next for help and to see what parameters this plugin accepts do:
./check_redis.pl –help
命令
define command {
command_name check_redis_new
command_line $USER1$/check_redis.pl -H $HOSTADDRESS$ -p $ARG1$ -T $ARG2$ -M $_HOSTSYSTEM_MEMORY$ -m $ARG3$
}
# Arguments and thresholds are:
# $ARG1 : 端口
# $ARG2 : 反馈时间区间
# $ARG3 : 内存利用率阀值
服务模板
define service {
use prod-service
hostgroups redishosts
service_description Redis
check_command check_redis_new!6379!”1,2″!”80,90″!
}
主机模板
define host {
use prod-server
host_name redis.mynetwork
address redis.mynetwork
alias Redis Stat Server
hostgroups linux,redishosts
_SYSTEM_MEMORY ‘8G’
}
Redis.pl有很多扩展监控,请看./check_redis.pl –help
配置例子:
主机
define host {
host_name Redis01-70.175
alias Redis01-70.175
address 10.10.10.175
contact_groups admin
check_command check-host-alive
_SYSTEM_MEMORY ’64G’
max_check_attempts 5
notification_interval 10
notification_period 24×7
notification_options d,u,r
}
服务
define service {
host_name Redis01-70.175
use abc
service_description check_redis 6379
contact_groups admin
check_command check_redis!6379!”1,2″!”80,90″!
}
命令
define command {
command_name check_redis
command_line $USER1$/check_redis.pl -H $HOSTADDRESS$ -p $ARG1$ -T $ARG2$ -M $_HOSTSYSTEM_MEMORY$ -m $ARG3$
}