check_files to use with NRPE for windows machine
Posted: Wed Apr 05, 2017 1:05 am
Hi Box 293,
I used the check_files command with NRPE to check no of files in a folder on a windows machine and I got the results.
But the problem is check_files is even counting the no of files in the sub folders which we do not want.
I am not getting how I can modify the command for the same
check_nrpe -H xx.xx.xx.xx -t 30 -c check_files -a path='D:/ServiceNow/Data/Integration/Matrix/ToSN' pattern=*.* 'warning=count>=8' 'critical=count>=10' top-syntax='${status}:${count} files' 'empty-state=ok'
CRITICAL:30913 files|'count'=30913;8;10
But this is counting the no of files in the subdirectories in /ToSN. which we do not want.
Kindly help
I used the check_files command with NRPE to check no of files in a folder on a windows machine and I got the results.
But the problem is check_files is even counting the no of files in the sub folders which we do not want.
I am not getting how I can modify the command for the same
check_nrpe -H xx.xx.xx.xx -t 30 -c check_files -a path='D:/ServiceNow/Data/Integration/Matrix/ToSN' pattern=*.* 'warning=count>=8' 'critical=count>=10' top-syntax='${status}:${count} files' 'empty-state=ok'
CRITICAL:30913 files|'count'=30913;8;10
But this is counting the no of files in the subdirectories in /ToSN. which we do not want.
Kindly help