尝试从我的nagios服务器获得主机的Windows主机检查。 在这一点上,我甚至没有使用nagios,只是从命令行运行check_nt。
这是我从允许的主机使用的命令:
check_nt -H 10.10.5.200 -p 12489 -v CLIENTVERSION
这是输出:
[root@nagioshost]# /usr/lib64/nagios/plugins/check_nt -H 10.10.5.200 -p 12489 -v CLIENTVERSION No data was received from host! could not fetch information from server
运行'nscptesting'我可以看到连接进来,但失败:
D nrpe Accepting connection from: 10.10.7.101, count=1 E nrpe Failed to establish secure connection: short read: 219 c:\source\nscp\include\socket/connection.hpp:243
这是我的nsclient.ini字段
[/settings/default] password = Me0zf92h7f allowed hosts = 10.10.7.101 [/settings/NRPE/server] verify mode = none port = 12489 insecure = true [/modules] CheckExternalScripts = 1 CheckHelpers = 1 CheckEventLog = 1 CheckNSCP = 1 CheckDisk = 1 CheckSystem = 1 NRPEServer = 1
check_nrpe用于NRPEServer,check_nt用于NSCLientServer
因此,您需要将您的configuration移到NSClientServer模块以使check_nt正常工作,或者更好地停止使用check_nt并移到check_nrpe *。
[/settings/default] password = Me0zf92h7f allowed hosts = 10.10.7.101 [/settings/NSClient/server] port = 12489 [/modules] CheckExternalScripts = 1 CheckHelpers = 1 CheckEventLog = 1 CheckNSCP = 1 CheckDisk = 1 CheckSystem = 1 NSClientServer = 1