Search Exchange

Search All Sites

Nagios Live Webinars

Let our experts show you how Nagios can help your organization.

Contact Us

Phone: 1-888-NAGIOS-1
Email: sales@nagios.com

Login

Remember Me

Directory Tree

check_fileage.vbs

Rating
1 vote
Favoured:
1
Current Version
1.0
Last Release Date
2014-07-16
Compatible With
  • Nagios 2.x
  • Nagios 3.x
  • Nagios 4.x
Hits
24332
Nagios CSP

Meet The New Nagios Core Services Platform

Built on over 25 years of monitoring experience, the Nagios Core Services Platform provides insightful monitoring dashboards, time-saving monitoring wizards, and unmatched ease of use. Use it for free indefinitely.

Monitoring Made Magically Better

  • Nagios Core on Overdrive
  • Powerful Monitoring Dashboards
  • Time-Saving Configuration Wizards
  • Open Source Powered Monitoring On Steroids
  • And So Much More!
check specific file age on Windows.
This is a NSClient++ addon script for Nagios that will check specific file age.
Returns Warning or Critical if file is older than specified minutes.
$ARG1$ : The file path eg. c:/temp/watchme.log *** this must be a 8.3 file format, if there is any space, it won't work.
$ARG2$ : Warning level in minutes
$ARG3$ : Criticl level in minutes

Setup :
==============================
1. copy the vbscript to NSClient/script folder

2. edit nsclient.ini and add the follow segment
[/settings/external scripts/scripts]
check_fileage=cscript.exe //nologo //T:30 scriptscheck_fileage.vbs $ARG1$ $ARG2$ $ARG3$

3. create a new command in nagios
define command{
command_name check_fileage
command_line $USER1$/check_nrpe -H $HOSTADDRESS$ -t 30 -u -c check_fileage -a $ARG1$ $ARG2$ $ARG3$
}

4. create your nagios service
define service{
use generic-service
host_name TEST_HOST
service_description -check file age
check_command check_fileage!c:/temp/watchme.log!10!20
}
Reviews (1)
bynoortr01, March 17, 2015
Hello,

I have done all off the setting. I get alway's these errror

[root@nagios var]# /usr/local/nagios/libexec/check_nrpe -H 192.168.1.1 t 30 -u -c check_fileage -a c:\temp.txt 60 100
CRITICAL: $ARG1$ does not exist.