Page 1 of 1

check_files - checking fileage of files in folder - help pls

Posted: Mon Sep 05, 2016 8:00 am
by marnix
i dont get it working and dont understand the docu @ https://docs.nsclient.org/reference/win ... heck_files

i want to check the fileage in of all files in a folder and get a warning when there are files older than XX minutes / hours.

i added these, but it doesnt work. please help me...
define service{
use generic-service
host_name XXX-XX
service_description TEST AGE
check_command check_nrpe!check_files path=d:\Save\2006\XXX 'crit= age > 345600'
}

Re: check_files - checking fileage of files in folder - help

Posted: Tue Sep 06, 2016 12:40 am
by marnix
i changed it to
define service{
use generic-service
host_name Test
service_description Backup
check_command check_nrpe_files!check_files!/path:"d:\\Savedb\\XXX\\XXX" /age:96h /selage:older /warning:1: /critical:1:
}
now. But still no output.
Exception processing request: Request contained arguments (not currently allowed, check the allow arguments option).

Re: check_files - checking fileage of files in folder - help

Posted: Tue Sep 06, 2016 10:47 am
by rkennedy
Take a look at your NSClient++ configuration file, and make a change for allow_arguments to be turned on as this document suggests - https://docs.nsclient.org/howto/external_scripts.html

Code: Select all

[/settings/NRPE/server]
allow arguments=true

[/settings/external scripts]
allow arguments=true