I am trying to set up monitoring of the size of folders on a Windows server from a Linux box through NRPE using NSClient++ (0.4.0.148-win64) . The basic setup is ok and I am for example able to issue the "CheckDriveSize" command which is part of the same "CheckDisk"-module that "CheckFileSize" is part of.
The problem is that when I attempt to execute "CheckFileSize" I get a "BAD_CODE: -1" error in NSClient++. The command I attempting is the following basically straight from the manual (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/*.*
The log output I get is this:
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
What is extra strange is that when I issue a command that is guaranteed to not be present it lists the available commands of which "checkfilesize" is one:
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
I guess I could write my own script to do the folder size check but I figure there might be something I have incorrectly configured so if anyone has a tip on what to try I would be very grateful.
Thanks, Olof