nagios3的NSClient ++身份validation问题

我已经在Windows XP主机上安装并configuration了NSClient ++,并设置了默认的密码来testingC:\ Program Files \ NSClient ++ \ NSC.ini中的哪一个。

nagios正在显示Windows服务,但它说NSClient – 错误:无效的密码。

我正在使用NSC.ini文件中的默认密码。 它运行时,我运行下面的命令从Linux中,我也启用了端口。

检查CPU负载

/ usr / lib / nagios / plugins / check_nt -H'192.168.36.177'-s'secret-password'-p 12489 -v CPULOAD -w 80 -c 90 -l 5,80,90,10,80,90

检查用过的磁盘空间

/ usr / lib / nagios / plugins / check_nt -H'192.168.36.177'-s'secret-password'-p 12489 -v USEDDISKSPACE -d SHOWALL -lc

请任何人都可以告诉我哪里可能出错了?

这可能意味着,在运行命令时,某种程度上“secret-password”没有正确传递给Nagios。 有时可能会出现奇怪的扩展问题或引用问题。

我build议在Nagios中启用debugging以查看实际运行的命令:

debug_level=-1 # DEBUG VERBOSITY # This option determines how verbose the debug log out will be. # Values: 0 = Brief output # 1 = More detailed # 2 = Very detailed debug_verbosity=2 # DEBUG FILE # This option determines where Nagios should write debugging information. debug_file=/usr/local/nagios/var/nagios.debug 

很可能您没有在check_nt命令定义中设置密码:

 define command{ command_name check_nt command_line $USER1$/check_nt -H $HOSTADDRESS$ -p 12489 -s s3cret -v $ARG1$ $ARG2$ }