我的 kdc 插件工作正常
/usr/lib64/nagios/plugins/check_kdc -H samba4 -p nagios/[email protected] -k /etc/nagios/nagios.keytab
OK
但在网页上给我这个错误
(Return code of 13 for service 'KDC' on host 'samba4' was out of bounds)
这是cfg
命令.cfg
define command{
command_name check_kdc
command_line /usr/lib64/nagios/plugins/check_kdc -H $HOSTADDRESS$ -k $ARG1$ -p $ARG2$
}
mydom.cfg
define service{
use local-service ; Name of service template to use
host_name samba4
service_description KDC
check_command check_kdc!/etc/nagios/nagios.keytab!nagios/[email protected]
notifications_enabled 1
}
为什么nagios返回错误13?
答案1
你需要转义$
你的角色check_command
参考:https://support.nagios.com/kb/article/nagios-xi-special-characters-580.html
答案2
找到解决方案。只是权限问题。
chown -Rc root:nagios /usr/lib64/nagios/plugins
chmod -c 750 /usr/lib64/nagios/plugins/check_kdc