Page 1 of 1

check_files to use with NRPE for windows machine

Posted: Wed Apr 05, 2017 1:05 am
by jyoti22
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

Re: check_files to use with NRPE for windows machine

Posted: Wed Apr 05, 2017 10:13 am
by SteveBeauchemin
Maybe try the setting

Code: Select all

max-depth=1
Did a quick google search and found this
https://docs.nsclient.org/reference/win ... heck_files

Steve B

Re: check_files to use with NRPE for windows machine

Posted: Wed Apr 05, 2017 10:29 am
by mcapra