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


Remember Me

Directory Tree


0 votes
Current Version
Last Release Date
Compatible With
  • Nagios 3.x
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.
Network Monitoring Software - Download Nagios XI
Log Management Software - Nagios Log Server - Download
Netflow Analysis Software - Nagios Network Analyzer - Download
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
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.