NSClient++ 中没有命令“CheckFileSize”的处理程序

NSClient++ 中没有命令“CheckFileSize”的处理程序

我正在尝试使用 NSClient++ (0.4.0.148-win64) 通过 NRPE 从 Linux 机器设置对 Windows 服务器上文件夹大小的监控。基本设置没问题,例如,我可以发出“CheckDriveSize”命令,该命令与“CheckFileSize”属于同一个“CheckDisk”模块。

问题是,当我尝试执行“CheckFileSize”时,我在 NSClient++ 中收到“BAD_CODE: -1”错误。我尝试的命令基本上直接来自手册(http://www.nsclient.org/nscp/wiki/CheckFileSize):

./check_nrpe -H windowsserver -p 5666 -n -c CheckFileSize -a ShowAll MaxWarn=1024M MaxCrit=4096M File:_WIN=c:/WINDOWS/*.*

我得到的日志输出是这样的:

 trunk\include\nrpe\server\connection.cpp:37   starting data connection
 runk\modules\NRPEServer\handler_impl.cpp:34   Running command:
CheckFileSize
    ..\..\..\trunk\service\NSClient++.cpp:1128 Injecting: checkfilesize...
    ..\..\..\trunk\service\NSClient++.cpp:1152 Result checkfilesize:
BAD_CODE: -1
 k\include\nscapi\nscapi_core_wrapper.cpp:181  No handler for command
'CheckFileSize'.
 runk\modules\NRPEServer\handler_impl.cpp:36   Running command:
CheckFileSize =
 trunk\include\nrpe\server\connection.cpp:106  Wrote data: 1036
 trunk\include\nrpe\server\connection.cpp:51   Timeout reading: 1024

更加奇怪的是,当我发出一个保证不存在的命令时,它会列出可用的命令,其中“checkfilesize”是其中之一:

d trunk\include\nrpe\server\connection.cpp:37   starting data connection
d runk\modules\NRPEServer\handler_impl.cpp:34   Running command: wtf
d    ..\..\..\trunk\service\NSClient++.cpp:1128 Injecting: wtf...
NOT FOUND
e    ..\..\..\trunk\service\NSClient++.cpp:1148 No handler for command:
wtf avalible commands: commands {, check_eventlog, check_eventlog_cache,
check_nscp, check_ok, checkalwayscritical, checkalwayso
k, checkalwayswarning, checkcounter, checkcpu, checkcritical,
checkdrivesize, checkeventlog, checkeventlogcache, checkfile2,
checkfiles, checkfilesize, checkmem, checkmultiple, checkok, checkprocstate
, checkservicestate, checksingleregentry, checktasksched,
checktaskschedvalue, checkuptime, checkversion, checkwarning, checkwmi,
checkwmivalue, listcounterinstances, nrpe_exec, nrpe_forward, nrpe_hel
p, nrpe_query, nrpe_submit, nsca_exec, nsca_forward, nsca_help,
nsca_query, nsca_submit, nscp_exec, nscp_forward, nscp_help, nscp_query,
nscp_submit, smtp_exec, smtp_forward, smtp_help, smtp_query, sm
tp_submit, syslog_exec, syslog_forward, syslog_help, syslog_query,
syslog_submit}, plugins {, 0, 1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 14,
16, 19, 21}
e k\include\nscapi\nscapi_core_wrapper.cpp:181  No handler for command
'wtf'.
d runk\modules\NRPEServer\handler_impl.cpp:36   Running command: wtf =
d trunk\include\nrpe\server\connection.cpp:106  Wrote data: 1036
d trunk\include\nrpe\server\connection.cpp:51   Timeout reading: 1024

我想我可以编写自己的脚本来检查文件夹大小,但我想可能是我配置不正确,所以如果有人能提供一些建议,我将不胜感激。

谢谢,奥洛夫

相关内容