check_files to use with NRPE for windows machine

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
jyoti22
Posts: 254
Joined: Mon Mar 23, 2015 4:50 am

check_files to use with NRPE for windows machine

Post 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
SteveBeauchemin
Posts: 524
Joined: Mon Oct 14, 2013 7:19 pm

Re: check_files to use with NRPE for windows machine

Post 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
XI 5.7.3 / Core 4.4.6 / NagVis 1.9.8 / LiveStatus 1.5.0p11 / RRDCached 1.7.0 / Redis 3.2.8 /
SNMPTT / Gearman 0.33-7 / Mod_Gearman 3.0.7 / NLS 2.0.8 / NNA 2.3.1 /
NSClient 0.5.0 / NRPE Solaris 3.2.1 Linux 3.2.1 HPUX 3.2.1
User avatar
mcapra
Posts: 3739
Joined: Thu May 05, 2016 3:54 pm

Re: check_files to use with NRPE for windows machine

Post by mcapra »

Former Nagios employee
https://www.mcapra.com/
Locked