Search Exchange
Search All Sites
Nagios Live Webinars
Let our experts show you how Nagios can help your organization.Login
Directory Tree
check_files.vbs - external script to be used with nsclient
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!
namefilter, age, size
counts the files which match the given criterias and gives alarm if the count is higher or lower than the threshold
(bounds definition conforms to nagios plugin guidelines)
check files under a given path
uses NagiosPlugin.vbs from nsclient++/scripts/lib
- NagiosPlugin.vbs which came with nsclient++ vers. 0.3.9 (earlier version needed adaptation)
- compares bounds to double values, so 10 comes after 9 (numeric sorting)
- bounds definition conforms to nagios plugin guidelines (http://nagiosplug.sourceforge.net/developer-guidelines.html#THRESHOLDFORMAT)
args:
=====
warning: threshold warning
alert if x...
10 < 0 or > 10, (outside the range {0..10})
10: < 10, (outside {10 .. 8})
~:10 > 10, (outside the range of {-8 .. 10})
10:20 < 10 or > 20, (outside the range {10..20})
@10:20 >= 10 and <= 20, (inside the range {10..20})
critical: threshold critical
namefilter: regular expressionon on which files have to match
age: files have to be older/newer (see selage) than age
e.g.: 5d: 5 days, 4h: 4 hours, 10n: 10 Minutes, 90s: 90 seconds
selage: older/newer/hour/ignore
older/newer: count only files if the are older/newer
hour: alert if file is not written until hour
ignore: count files independent of their age
searchdepth: search down x subdirs (searchdepth:1 - do not go down in directory hierarchy)
seldat: modified/created
modified: date, when file was written
created: date, when file was created
size: if file is smaller than given size give a warning
expectmatch: if less than expectmatch files correspond to namefilter give a warning
weekdays:
if selage:hour files have to be written only on weekdays (1:sunday, 2:monday, ...)
if selage:newer or selage:older and the timeunit of age is d (days), we add as many days to age as the last weekday is back
e.g.: weekdays:23456 files are written on Monday, Tuesday, Wednesday, Thursday, Friday
uses NagiosPlugin.vbs from nsclient++/scripts/lib
- NagiosPlugin.vbs which came with nsclient++ vers. 0.3.9 (earlier version needed adaptation)
- compares bounds to double values, so 10 comes after 9 (numeric sorting)
- bounds definition conforms to nagios plugin guidelines (http://nagiosplug.sourceforge.net/developer-guidelines.html#THRESHOLDFORMAT)
args:
=====
warning: threshold warning
alert if x...
10 < 0 or > 10, (outside the range {0..10})
10: < 10, (outside {10 .. 8})
~:10 > 10, (outside the range of {-8 .. 10})
10:20 < 10 or > 20, (outside the range {10..20})
@10:20 >= 10 and <= 20, (inside the range {10..20})
critical: threshold critical
namefilter: regular expressionon on which files have to match
age: files have to be older/newer (see selage) than age
e.g.: 5d: 5 days, 4h: 4 hours, 10n: 10 Minutes, 90s: 90 seconds
selage: older/newer/hour/ignore
older/newer: count only files if the are older/newer
hour: alert if file is not written until hour
ignore: count files independent of their age
searchdepth: search down x subdirs (searchdepth:1 - do not go down in directory hierarchy)
seldat: modified/created
modified: date, when file was written
created: date, when file was created
size: if file is smaller than given size give a warning
expectmatch: if less than expectmatch files correspond to namefilter give a warning
weekdays:
if selage:hour files have to be written only on weekdays (1:sunday, 2:monday, ...)
if selage:newer or selage:older and the timeunit of age is d (days), we add as many days to age as the last weekday is back
e.g.: weekdays:23456 files are written on Monday, Tuesday, Wednesday, Thursday, Friday
Reviews (0)
Be the first to review this listing!