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”

Leave a Reply

Your email address will not be published.

To create code blocks or other preformatted text, indent by four spaces:

    This will be displayed in a monospaced font. The first four 
    spaces will be stripped off, but all other whitespace
    will be preserved.
    
    Markdown is turned off in code blocks:
     [This is not a link](http://example.com)

To create not a block, but an inline code span, use backticks:

Here is some inline `code`.

For more help see http://daringfireball.net/projects/markdown/syntax