Page 1 of 1

Problems with check_age_files

Posted: Wed Feb 13, 2019 10:21 am
by bbsawhy
Hello guys,
I'm having some difficulties in adding a monitor to a folder in a Windows Server.
I would like to know if there are any tips to facilitate this task, or an example of the command to be executed.

I would like to monitor a folder that should not contain files for more than 15 minutes, that is, it will always be empty, but at some point some files are moved to it and are then removed by another application.

If you can help me with this, thank you!

Re: Problems with check_age_files

Posted: Wed Feb 13, 2019 5:47 pm
by cdienger
Are you using ncpa or nsclient already on the Windows machine? If not, I'd suggest our NCPA client. I found this plugin that seems to do what you want:

https://exchange.nagios.org/directory/P ... ry/details

Note that you'll need to edit it and set the $fullPath and $nummins options in it. The file should be copied to plugins folder of the NCPA installation directory and then can be tested with:

./check_ncpa.py -H <hostname|ip> -t 'token' -M 'plugins/check_fileage.ps1'

steps for integerating a script with nsclient++ can be found at:

https://support.nagios.com/kb/article.php?id=528