Search Exchange
Search All Sites
Nagios Live Webinars
Let our experts show you how Nagios can help your organization.Login
Directory Tree
check_file_md5s
1.0
2009-11-09
- Nagios 3.x
101035
File | Description |
---|---|
check_file_md5s | NRPE script to verify files against a stored md5sum |
md5s.example | Example of the md5s file. |
rebuild_md5s | Shell script to rebuild the /etc/nagios/md5s file automatically. Saves a dated filename copy. |
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!
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.
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.
Reviews (0)
Be the first to review this listing!