check_files - checking fileage of files in folder - help pls

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
marnix
Posts: 7
Joined: Wed Jul 20, 2016 8:44 am

check_files - checking fileage of files in folder - help pls

Post 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'
}
marnix
Posts: 7
Joined: Wed Jul 20, 2016 8:44 am

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

Post 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).
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

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

Post 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
Former Nagios Employee
Locked