Freewaregruppe Monitoring/Nagios-Plugins
Windows-Plugin: checks the integrity of any files by their file size (checksum in bytes)
check_filesystem_e is a Windows plugin for Nagios, which checks the integrity of any files by their file size (checksum in bytes) .
A comma- separated list of Excludes is possible, supports also Regex for file names.
–
The script usually is called with the desired file specification and the expected size :
C:> check_filesystem_e.exe subdir=<Programm Dir to scan> filename=<Name of File(s) to scan> filesize=<expected size in bytes>
For debugging purposes, it may also be called with a more detailed output option (this mode is not suitable for continuous operation, but for testing purposes only).
Afterwards it will output the detailed status of the individual components :
C:> check_filesystem_e.exe subdir=d:\logs filename=*.log filesize=7 debug
check_filesystem_e.exe subdir=c:\temp filename=*.log filesize=7 debug Subdir: c:\temp Filename:*.log Filesize:7 c:\temp OK: test1.log OK: test2.log OK: test3.log CORRUPT: test4.log c:\temp\test1 c:\temp\test2 c:\temp\test3 CRITICAL: 4 files scanned in c:/temp - 1 file(s) corrupt - c:/temp/test4.log
For informations and usage you can call it with the help command:
C:\>check_filesystem_e.exe help
check_filesystem_e - Plugin Nagios shows integrity of files and damages. Use: subdir - Start directory to scan exclude - Folder(s) without scanning A comma-separated list is also possible here filename - File(s) to scan. regex possible filesize - Expected Size timeout - Seconds before the plugin exits (default=15) version - Plugin version help - Displays this text debug - Returns details. NOT use with Nagios
Preferably the plugin is copied into the script directory where you will store your checks under Windows
When using NSClient ++ use an entry in NSC.INI similar to this, pointing to check_filesystem_e.exe:
... [/modules] NRPEServer=enabled CheckExternalScripts=enabled [/settings/NRPE/server] allow arguments=true [/settings/external scripts/scripts] check_dv_adrarc=scripts\check_filesystem_e.exe subdir=d:\david\archive\address filename=*.dat filesize=430 timeout=300 ...
Checks a Tobit David Address-Archive for defects or corruptions on system-files, here: things are OK:
c:\scripts\check_filesystem_e.exe subdir=d:\david\archive\address filename=*.dat filesize=430 timeout=300
OK: 26 Files scanned in d:/david/archive/address: None of corrupt files
2014-06-04
1.2 – Support for .Net 4.0
2011-02-03
1.1 – several small fixes
2010-29-01
1.0 – First public version
check_filesystem_e is licensed under the GNU General Public License .
Joachim Luft will answer your questions to this Plugin and is happy about your donation.