I have a series of folders that I need to monitor. These folders have files downloaded to them periodically and I need to know if now files have been downloaded in the last day.
The downloaded files are cleared out hourly.
Is there a way of using check_files to monitor the folder modification date/time?
My folders are:
D:\Downloads\a
D:\Downloads\b
D:\Downloads\c
D:\Downloads\d
D:\Downloads\e
I have found a command to check the file modified date however I am unsure of how to convert this to folder modified date:
./check_nrpe -H 10.25.11.3 -c check_files -a path=’E:\\ServerFolders\\NoBackup\\Junk’ pattern=*.* ’filter= written > -2h’ ’crit= count < 1’ ’empty-state=critical’ ’empty-syntax=${status}: No files found’
https://support.nagios.com/kb/article/f ... e_modified
Monitor folder modified data
-
- Support Tech
- Posts: 3457
- Joined: Mon May 15, 2017 5:00 pm
Re: Monitor folder modified data
Hello, @McHenry. Are the folders static or they're being created on daily basis? If the folders are static you could run a similar query for each one:
Code: Select all
./check_nrpe -H 192.168.3.239 -c check_files -a path=d:/downloads/a/ 'crit=age<86400'
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.