When using check_files to monitor the number files in a folder that doesn't exist, we receive a OK state back with "No files found". So, no warning or unknown state saying that the folder does not exist.
We only found the errors in the nsclient.log:
error:c:\source\master\modules\CheckDisk\file_finder.cpp:107: Invalid file specified
error:c:\source\master\modules\CheckDisk\file_finder.cpp:107: File was NOT found!
COMMAND: $USER1$/check_nrpe_v3 -2 -P 10240 -H server -p 5666 -t 120 -c check_files -a $ARG1$
ARG1: path='\\full\path' pattern=*.* 'critical=count>0' 'empty-state=ok'
Expected Behavior
To get a UNKNOWN or WARNING state when the folder is missing.
Issue and Steps to Reproduce
When using check_files to monitor the number files in a folder that doesn't exist, we receive a OK state back with "No files found". So, no warning or unknown state saying that the folder does not exist. We only found the errors in the nsclient.log: error:c:\source\master\modules\CheckDisk\file_finder.cpp:107: Invalid file specified error:c:\source\master\modules\CheckDisk\file_finder.cpp:107: File was NOT found!
Expected Behavior
To get a UNKNOWN or WARNING state when the folder is missing.
Actual Behavior
We get OK back.
Details
Additional Details
NSClient++ log: