Search Exchange

Search All Sites

Nagios Live Webinars

Let our experts show you how Nagios can help your organization.

Contact Us

Phone: 1-888-NAGIOS-1
Email: sales@nagios.com

Login

Remember Me

Directory Tree

check_file_system

Rating
0 votes
Favoured:
0
Current Version
1.0
Last Release Date
2017-05-09
Compatible With
  • Nagios 2.x
Owner
License
Other
Hits
6640
Files:
FileDescription
check_file_system.pyNagios plugin that compares checksums of all files in given path list with stored checksum of that file
check_file_system_cronjobHelper script if nagios user unable to access all files, e.g. /etc/shadow*
cfs_setup_cronmodeSetup check_file_system on your system using cron helper script
cfs_setupOptional (simpler) setup if nagios user has read permission or using sudo to access all files required
Nagios CSP

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!
Compare checksums of all files in arbitrary directories with expected checksum from cache file.
check_file_system: Compare checksums of files against a list of cached checksums for use as a nagios plugin.

Returns warning if:
- new file found, i.e. file path not yet in cache
- file not readable, e.g. error on access

(not yet: - file not found, i.e. a path from the cache does no longer exist in the file system)

Returns critical if:
- checksum from cache does not match checksum of path
- checksum cache has been modified (without updating the separately kept checksum for the cache.)

Handles dangling symbolic links if:
- checksum cache contains special check sum "-1"

== Setup ==

Setup handled via configuration properties in section marked with comment "# Setup ... # End Setup" in check_file_system.py:

CFS_CACHE: location of checksum cache
CFS_CACHE_CHECKSUM: location of checksum for checksum cache -- required if CFS_CACHE is located in a directory that should be checked.
CFS_CHECK_PATH: default directories to check if not overridden by command line.
CFS_EXCLUDE_PATTERN: regular expressions for path names that should never be checked. CFS_CHECK_PATH must always be present in this list.
CFS_CRON_MODE: If set to True, output will be redirected to log file instead of stdout, i.e. if your setup does not require cron helper script, YOU MUST set this property to False.

Getting check_file_system.py setup is not trivial, especially if you have to use the cron wrapper script and want to monitor the checksum cache as well. See the cfs_setup_cronmode helper script for required steps. If you change any of the default file system locations, remember to forward your changes to cron job, cron helper script (if used) __and__ check_file_system.py