我修改了一个简单的ruby插件,并试图让它在我的redis服务器上运行(不使用npre监控远程主机)。
该命令位于redis plugins目录中:
ubuntu@ip-172-30-0-79:/usr/local/nagios/etc$ ls -al /usr/lib/nagios/plugins/check_redis
-rwxr-xr-x 1 nagios nagios 4718 Apr 25 18:54 /usr/lib/nagios/plugins/check_redis
我的commands.cfg
define command {
command_name check_redis_hash
command_line /usr/lib/nagios/plugins/check_redis -H $HOSTADDRESS$ -p $ARG1$ -K $ARG2$ -o $ARG3$ -j $ARG4$
}
但我在日志中得到了这个
[1429989009] Warning: Return code of 127 for check of service 'check that redis is up and a specific hash returns' on host 'redis_slave_two' was out of bounds. Make sure the plugin you're trying to run actually exists.
我是否还需要做其他事情以确保插件正常工作?
答案 0 :(得分:0)
当然它会变得简单,我错过了参数周围的'
符号,添加这些符号解决了问题。