Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
net
itefix.net
Search... Search
check_winfileNRPEcheckpluginforWindowsfiles/directories
SHA256: 9b8942672b700807584ee31ebde1e4f801f9afc23209220cc67989fa2c11a8a8
NAME
check_winfile Nagios NRPE plugin for file check
SYNOPSIS
check_winfile target file/directory[,file/directory]...]] [[target ...] ... ] filter filterspec[,filterspec]...]] [[filter ...] ... ] [delete] [
warning threshold] [critical threshold] [rootonly] [compare operator] [verbose] [help]
DESCRIPT ION
check_winfile 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.
https://www.itefix.net/check_winfile 1/7
12/28/2016 check_winfile - NRPE check plugin for Windows files/directories | itefix.net
ForexTradingPlatform
CreateaForexTradingAccountFree$100,000PracticeAccountGoto
centrofx.com
OPT IONS
target file/directory[,file/directory]...]] [[target ...] ... ]
This option specifies targets to check. A target can be a simple file or a recursive list of files in a directory. You can specify
several comma separated targets for one target option, as well as several target options. At least one is required.
Specify filters to select files. A filterspec consist of three fields: filter name, operator and value. You can specify several
comma separated filters for one filter option, as well as several filter options. Defaults to all files if no filter is defined. List
of filters available:
check_winfile uses perl module Time::ParseDate for parsing of the file age. A short sample of supported formats is
Dow, dd Mon yy
Dow, dd Mon yyyy
Dow, dd Mon
dd Mon yy
count "days"
count "weeks"
count "months"
count "years"
https://www.itefix.net/check_winfile 2/7
12/28/2016 check_winfile - NRPE check plugin for Windows files/directories | itefix.net
hh:mm:ss[.ddd]
hh:mm
hh:mm[AP]M
hh[AP]M
count "minutes"
count "seconds"
count "hours"
"+" count units
delete
warning threshold
Return WARNING if the number of files to consider is more than threshold. Optional.
critical threshold
Return CRITICAL if the number of files to consider is more than threshold. Optional.
rootonly
Limit file search to the top level of targets. No recursive traversal of directories.
compare operator
Specify the type of comparison operator for threshold checks. Optional. Available values are:
'eq' equal to
'ne' not equal
'gt' greater than (default!)
'ge' greater or equal
'lt' less than
'le' less or equal
https://www.itefix.net/check_winfile 3/7
12/28/2016 check_winfile - NRPE check plugin for Windows files/directories | itefix.net
verbose
help
EXAMPLES
check_winfile --target c:\temp --warn 100 --critical 250
Counts all files in the directory c:\temp. Returns WARNING for more than 100 files or CRITICAL for more than 250 files.
Returns CRITICAL if at least one of the files c:\backup\db1 and c:\backup\db2 is modified during the last 24 hours.
check_winfile --target "c:\logfiles" --filter "size gt 10485760","age lt -15 minutes" --filter "name match \.log
Counts and deletes files with .log extension, which are modified before last 15 minutes AND are larger than 10 MB. Returns
WARNING if there are more than 10 files meeting the criteria, CRITICAL for more than 50 files.
EXIT VALUES
0 OK
https://www.itefix.net/check_winfile 4/7
12/28/2016 check_winfile - NRPE check plugin for Windows files/directories | itefix.net
1 WARNING
2 CRITICAL
3 UNKNOWN
AUT HOR
Tevfik Karagulle http://www.itefix.net
SEEALSO
Nagios web site http://www.nagios.org
Nagios NRPE documentation https://assets.nagios.com/downloads/nagioscore/docs/nrpe/NRPE.pdf
Regular Expressions https://en.wikipedia.org/wiki/Regular_expression
Perl module Time::ParseDate http://search.cpan.org/~muir/Timemodules
2006.0814/lib/Time/ParseDate.pm(http://search.cpan.org/%7Emuir/Timemodules2006.0814/lib/Time/ParseDate.pm)
COPYRIGHT
This program is distributed under the Artistic License. https://opensource.org/licenses/artisticlicense.php
VERSION
Version 1.5, May 2011
CHANGELOG
https://www.itefix.net/check_winfile 5/7
12/28/2016 check_winfile - NRPE check plugin for Windows files/directories | itefix.net
- renamed as check_winfile
- produce performance data output according to guidelines
- Complete redesign of filter option. Options size and age are implemented as filters.
- Option --rootonly
- better performance
- Bug fix! Drop subdirectories from counting.
https://www.itefix.net/check_winfile 6/7
12/28/2016 check_winfile - NRPE check plugin for Windows files/directories | itefix.net
https://www.itefix.net/check_winfile 7/7