Home Directory Plugins Security check_file_md5s

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_md5s

Rating
0 votes
Favoured:
0
Current Version
1.0
Last Release Date
2009-11-09
Compatible With
  • Nagios 3.x
Owner
Hits
101035
Files:
FileDescription
check_file_md5sNRPE script to verify files against a stored md5sum
md5s.exampleExample of the md5s file.
rebuild_md5sShell script to rebuild the /etc/nagios/md5s file automatically. Saves a dated filename copy.
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!
Simple file integrity checker.
Very simplistic NRPE plugin that will check md5sum's of system files against a stored list.

Steps to install:

1. Generate the stored /etc/nagios/md5s by running:
- /usr/bin/md5sum [Fully Qualified Filename] >> /etc/nagios/md5s
- Do that for each file you wish to monitor.

2. Put the check_file_md5s script in your plugins directory, define the command on the NRPE client config and restart NRPE:
- command[check_file_md5s]=/usr/lib64/nagios/plugins/check_file_md5s

3. Define the command and service in Nagios.
define service{
use linux-service
host_name
service_description NRPE_file_md5
check_command check_nrpe!check_file_md5s
}
- Reload nagios configuration

NRPE will then compare the current md5sum's for each file against that stored list. If differences are found it will issue a Warning back to Nagios.

Tested on Fedora and Scientific Linux with a Nagios 3 server.

30 Nov 2009: Added a script that copies the md5s file to a new filename with a datestamp and then rebuilds the file with current md5sum's. Makes it easy to update the file when any of the monitored files are modified.