Page 1 of 1

check_winfile - age of file not working

Posted: Thu Aug 18, 2016 7:39 am
by marnix
hi
i want to filter some files in a folder. i want to get a crit when there are files older than 4 days
check_winfile is working - i got a check with filesize bigger than 3gb working fine

here is code:
check_winfile_age_odb_d = scripts\check_winfile.exe --target "D:\Savedb\" --filter "age ge 96 hours" --critical 0

Output while files are 1-10 days old:
FILE OK - 0 files out of 18 to consider

Re: check_winfile - age of file not working

Posted: Thu Aug 18, 2016 9:35 am
by mcapra
Is there a particular reason you are using check_winfile as opposed to the built-in check_files command for NSClient++?

Code: Select all

[root@localhost libexec]# ./check_nrpe -H 192.168.67.99 -c check_files -a 'path=c:/users/admin/documents/files/' 'crit= age > 345600'
CRITICAL: 2/3 files (test.txt, test2.txt)|'test.txt_age'=3530479;0;345600 'test2.txt_age'=3530479;0;345600 'test3.txt_age'=857;0;345600
https://docs.nsclient.org/reference/win ... heck_files