Check manual page of fileinfoMay 02. 2012
fileinfoAuthor: Mathias Kettner License: GPL Distribution: official part of Check_MK Supported Agents: Windows This check monitors the size and age of specific files
in the target host's filesystem.
You can set lower and upper
limits on both the modification time and the size of
a file. When the file is missing then the check will go
UNKNOWN.
This check needs some configuration in the agent,
as the agent needs to know the information about
which files need to be sent.
Currently only the Windows agent supports this type
of check. Configuration is done in check_mk.ini in
the section [fileinfo]. Put one or more entries
of the format path = C:\Some Dir\*.log into this
section. The agent will send all files that match
the pattern. Wildcards are only allowed in the
filename part, not in the directory path.
ItemThe complete path name of the file as sent by
the agent (this is case sensitive even when monitoring
Windows).
Please note: when referring to the item in
check_parameters, make sure that backslashes
(contained in Windows paths) are properly
quoted. You need one escape level for the Python
string and one for the regular expression.
If you prefix the Python string with a r, then
just the regular expression needs its double
backslash (see examples). Without the r you
would need four backslashes in a row in order to
denote one backslash in the file's path.
Check parameters
Performance dataTwo values: the size of the file in bytes and the age
of the file in seconds (the time since the last
modification of the file).
InventoryFor each file that the agent sends one service will
be created.
Configuration variablesNone. Examplesmain.mk
check_parameters += [
# Alert if backup files are too small
( { "minsize" : (5000000, 10000000) },
ALL_HOSTS, [ "File D:\\Backup\\.*.zip" ] ),
# Alert if snapshot file are too old
( { "maxage" : (120, 180) },
ALL_HOSTS, [ "File.*snapshot" ] ),
]
|
| ||||||||||||||||||