Check Files - Windows NRPE plugin (Visit this link)
5 from 1 votesCounts the number of files in given directory and its sub-directories, with optional filters applied. The output is compatible with Nagios.
Script Name : check_files.vbs
Usage Syntax : cscript.exe //NoLogo check_filecount.vbs -p <path> [-r] [-f <filter>] -w <warn> -c <crit> | -h
Author : Alex Simenduev, PlanetIT (http://www.planetit.ws)
Version : 2009.11.1
LastModified : 1/11/2009
Description : Counts the number of files in given directory and its
subdirectories, with optional filters applied. The output is
compatible with Nagios. Default Exit code is 3 (UNKNOWN)
Examples:
cscript.exe //NoLogo check_files.vbs -p C:\Windows\Temp -w 100 -c 200
Count files in C:\Windows\Temp, return WARNING if number of
files more than 100 and CRITICAL if more than 200.
cscript.exe //NoLogo check_files.vbs -p D:\Files -f "Size:>1024*1024" -w 5 -c 20
Count files in D:\Files, and look only for files that are bigger than 1MB,
return WARNING if number of files more than 5 and CRITICAL if more than 20.
cscript.exe //NoLogo check_files.vbs -p D:\Logs -f "AgeCreated:>7*60*60*24" -f "RegEx:.*\.log$" -w 5 -c 5
Count files in D:\Logs, and look only for log (*.log) files that are
created at least 7 days ago, return CRITICAL if more than 5 was found.
cscript.exe //NoLogo check_files.vbs -p C:\Windows -r -f "RegEx:.*\.tmp$" -w 20 -c 50
Count files in C:\Windows and its subdirectories, and look only for tmp (*.tmp) files,
return WARNING if number of files more than 20 and CRITICAL if more than 50 was found.
License:
- This script is supplied as-is without any support, I hope it works for you.
- You free to modify/distribute this script as you wish, but you must have the following line in the script:
Original author Alex Simenduev, PlanetIT (http://www.planetit.ws)
Change Log:
Legend:
[*] Informational, [!] Bugix, [+] Added, [-] Removed
Version 2009.11.1:
[!] More accurate argument parsing, will fix some small bugs.
[!] Fixed bug in RegEx filter if in pattern a ':' sign was specified.
[+] Added check for invalid filter type, script will exit with error printed.
[+] Added check for invalid filter value, script will exit with error printed.
[+] Added examples to the help screen.
[*] Recursive check is optional now, use '-r' option to turn it on.
Version 2009.10.29:
[!] More accurate check for the '--path' argument, added message.
Version 2009.10.28:
[*] Initial release.
Usage Syntax : cscript.exe //NoLogo check_filecount.vbs -p <path> [-r] [-f <filter>] -w <warn> -c <crit> | -h
Author : Alex Simenduev, PlanetIT (http://www.planetit.ws)
Version : 2009.11.1
LastModified : 1/11/2009
Description : Counts the number of files in given directory and its
subdirectories, with optional filters applied. The output is
compatible with Nagios. Default Exit code is 3 (UNKNOWN)
Examples:
cscript.exe //NoLogo check_files.vbs -p C:\Windows\Temp -w 100 -c 200
Count files in C:\Windows\Temp, return WARNING if number of
files more than 100 and CRITICAL if more than 200.
cscript.exe //NoLogo check_files.vbs -p D:\Files -f "Size:>1024*1024" -w 5 -c 20
Count files in D:\Files, and look only for files that are bigger than 1MB,
return WARNING if number of files more than 5 and CRITICAL if more than 20.
cscript.exe //NoLogo check_files.vbs -p D:\Logs -f "AgeCreated:>7*60*60*24" -f "RegEx:.*\.log$" -w 5 -c 5
Count files in D:\Logs, and look only for log (*.log) files that are
created at least 7 days ago, return CRITICAL if more than 5 was found.
cscript.exe //NoLogo check_files.vbs -p C:\Windows -r -f "RegEx:.*\.tmp$" -w 20 -c 50
Count files in C:\Windows and its subdirectories, and look only for tmp (*.tmp) files,
return WARNING if number of files more than 20 and CRITICAL if more than 50 was found.
License:
- This script is supplied as-is without any support, I hope it works for you.
- You free to modify/distribute this script as you wish, but you must have the following line in the script:
Original author Alex Simenduev, PlanetIT (http://www.planetit.ws)
Change Log:
Legend:
[*] Informational, [!] Bugix, [+] Added, [-] Removed
Version 2009.11.1:
[!] More accurate argument parsing, will fix some small bugs.
[!] Fixed bug in RegEx filter if in pattern a ':' sign was specified.
[+] Added check for invalid filter type, script will exit with error printed.
[+] Added check for invalid filter value, script will exit with error printed.
[+] Added examples to the help screen.
[*] Recursive check is optional now, use '-r' option to turn it on.
Version 2009.10.29:
[!] More accurate check for the '--path' argument, added message.
Version 2009.10.28:
[*] Initial release.
Submitted by: shamil.si
Hits: 1214
Overall downloads: 228
Added: 2009-11-01 12:27:09
Last Modified: 2009-12-12 19:57:47
| Filename | Preview | Size | Description | DL |
|---|---|---|---|---|
| check_files.vbs | 11 kb | Version 2009.11.1 | 328 |
Comments
Leave a reply
If you just want to rate the project leave the other field empty.
Even though it would be nice if you would drop a line.
-
Check Active Directory - TK
4 from 1 votesPerforms Active Directory Health Check on domain controllers and member servers. -
Basic NRPE_NT Plugins
from 0 votesThe plugins are DOS programs written in C/C++ The nrpe_nt service calls these plug-ins and they return the following status on exit with a status string for information printed to stdout. -
WMI agentless plugins
from 0 votesThis project consists of a set of VBS scripts that use Microsoft .NET Framework and WMI to retrieve data from remote Windows hosts without the need for agents on the remote hosts. Current release is 1.3 (December 5, 2008). -
NagiosPluginsNT
from 0 votesNagiosPluginsNT is a comprehensive collection of Nagios check plugins written in C# .NET. The goal is to eventually have a Windows equivalent to the official Nagios plugins for *NIX, but with the power of WMI for Windows monitoring. -
Check File - TK
from 0 votescheck_file is a Nagios NRPE plugin for checking simple files or files in directories by using various types of filters like file count, size, age or name match.
-
Check Services 1
from 0 votesChecks for changes of Auto startup services. -
check_dell_omreport for NRPE_NT
from 0 votesCheck status of Dell RAID array using Dell OpenManage Server Administrator utility \'omreport\' -
Check Perfcounter
from 0 votesChecks a "raw" performance counter. -
tntmonitoringplugins
from 0 votesThis is a comprehensive set of plugins that builds on and expands Mike Conigliaro's original NagiosPluginNT plugins along with a number of other useful plugins. Compatible with Windows 2008, and available in 32 or 64 bit versions. -
check_tcp
from 0 votesThis plugin tests TCP connections with the specified host. It also monitors the time to connect with warning and critical level.



