Use Nagios to Monitor Linux Software RAID
I use Nagios to monitor every server in my company’s infrastructure. It’s a bit of a hassle to setup, but once you get it up and running and understand the basic concept and how to use NRPE, it becomes easy to start monitoring every aspect of every machine in your network.
There are many services for which you need to seek out monitoring scripts in order to keep an eye on them with Nagios. The software comes with numerous basic scripts, but when I wanted to keep an eye on the health of my md volumes, I had to wade through a number of scripts to find one that worked how I wanted.
Step by Step Guide
Download the check_raid
script to your nagios plugins folder
cd /usr/lib64/nagios/plugins
wget https://marshallstokes.com/downloads/check_raid
In case you want to download the script another way, it’s here: https://marshallstokes.com/downloads/check_raid
Make sure the script is executable
chmod 755 check_raid
Run the script to confirm the output works (are you really using linux software raid?)
/usr/lib64/nagios/plugins/check_raid
You should see something like this:
OK: md:md0:UU md:md1:UU
Add it to your nrpe config for remote use
command[check_raid]=/usr/lib64/nagios/plugins/check_raid
Hopefully you know what to do after this step. If not, let me know in the comments section below and I’ll try to hold your hand a bit to get it working!
2 thoughts on “Use Nagios to Monitor Linux Software RAID”