Folder date monitoring

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
healthfusion
Posts: 12
Joined: Thu Nov 15, 2012 3:04 pm

Folder date monitoring

Post by healthfusion »

Hello,

Is anyone can point me to right direction how I can monitor folder modification date. For example I need monitor folder to make sure it was modified and has today date if it was not modified then create warning

Thanks for your help.
Last edited by healthfusion on Fri Nov 16, 2012 4:13 pm, edited 1 time in total.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Folder date monitoring

Post by scottwilkerson »

What type of system, Linux, Windows?
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
healthfusion
Posts: 12
Joined: Thu Nov 15, 2012 3:04 pm

Re: Folder date monitoring

Post by healthfusion »

Windows 2003 and 2008
Thanks
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: Folder date monitoring

Post by slansing »

I have found a plugin which may accomplish this for you:

http://exchange.nagios.org/directory/Pl ... le/details

To use this you must install the NSClient++ agent on the windows system, and use NRPE to monitor with.

http://assets.nagios.com/downloads/nagi ... _Agent.pdf

http://assets.nagios.com/downloads/nagi ... Client.pdf
healthfusion
Posts: 12
Joined: Thu Nov 15, 2012 3:04 pm

Re: Folder date monitoring

Post by healthfusion »

This plugin doesnt want to monitor folder age, so I am trying to make it for to monitor files age but having issues to pass arguments.
Steps I did:
1. uploaded file into Scripts directory
2. allow_arguments=1 and allow_nasty_meta_chars=1
3. in [Script Wrappings]:
vbs=cscript.exe //T:30 //NoLogo scripts\lib\wrapperCDbl.vbs %SCRIPT% %ARGS%

4. in [Wrapped Scripts]
check_files=check_MostRecentFile.vbs $ARG1$ $ARG2$ $ARG3$ $ARG4$

now if I run from nagios server: ./check_nrpe -H 192.168.10.120 -p 5666 -c check_files -a c:\temp 1440 2880 100
I'll get: Must enter 4 arguments: directory C W S; i.e. c:\testdir\ 1440 2880 100

From local machine it works.

What am I doing wrong?

Thanks
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Folder date monitoring

Post by scottwilkerson »

try wrapping the -a in quotes

Code: Select all

./check_nrpe -H 192.168.10.120 -p 5666 -c check_files -a 'c:\temp 1440 2880 100'
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
Locked