Page 1 of 2
RAID Monitoring
Posted: Wed Jan 30, 2013 9:52 am
by theangryheretic
I've got a question that I am hoping someone has an answer for, or at least a few suggestions. I have a Nagios server up and running, with a few monitoring checks set up. I would like to have my Nagios server monitor the RAID controllers of my other servers. I have found a few plugins that will give me a health check on the RIAD controller, but only locally.
I can't get my Nagios server to poll the remote server for the RAID health check. Has anyone found a way to do this? I have a variety of RAID controllers, Adaptec, Areca, 3Ware, and the LSI 3Ware controller.
Thanks in advance.
Re: RAID Monitoring
Posted: Wed Jan 30, 2013 10:06 am
by slansing
Lets start out with the following plug in:
http://exchange.nagios.org/directory/Pl ... AC/details
In order to use it we will need to install NSClient++ On a windows system and configure it with Nagios and NRPE. Have you already done so? You mentioned having a few things set up.
Re: RAID Monitoring
Posted: Wed Jan 30, 2013 11:19 am
by theangryheretic
Sorry, I forgot to mention the Nagios server is running on a Linux server and the remote machines I am monitoring are linux servers as well.
Re: RAID Monitoring
Posted: Wed Jan 30, 2013 11:24 am
by abrist
You will want to use nrpe to run these checks remotely (locally on the remote hosts).
Re: RAID Monitoring
Posted: Wed Jan 30, 2013 12:05 pm
by theangryheretic
abrist wrote:You will want to use nrpe to run these checks remotely (locally on the remote hosts).
That is what I am trying to do, but can not get working. I have NRPE working for my other checks, but can't get the RAID checks working.
Re: RAID Monitoring
Posted: Wed Jan 30, 2013 12:09 pm
by abrist
Post your nrpe.cfg and the service check command in a code wrap and I will take a look at it. Additionally, what errors are you receiving, and have you tried running the command from the nagios server cli?
Re: RAID Monitoring
Posted: Wed Jan 30, 2013 2:06 pm
by theangryheretic
I have attached the Disk Health check file that I pulled from exchange.nagios.org. It is on the remote server as well as the local Nagios server.
On the Nagios server, the only change I have made to the /etc/nagios/objects/commands.cfg file is the following addition.
define command{
command_name disk_health.pl
command_line /usr/lib64/nagios/plugins/disk_health.pl
}
When I look at my "Service Status Details For Host namazu" page this is the only failure I have.
RAID Controller CRITICAL 01-30-2013 13:59:16 1d 1h 3m 46s 4/4 (Service check did not exit properly)
Thanks for the help, and if there is anything I missed, or some additional information that is needed, let me know and I'll get it posted ASAP.
Re: RAID Monitoring
Posted: Wed Jan 30, 2013 2:18 pm
by slansing
You are running into an issue with perl.
Try setting the embedded perl in nagios to 0:
Code: Select all
set enable_embedded_perl=0 in nagios.cfg
Also take a look at this link regarding perl plugins and nagios:
http://nagiosplug.sourceforge.net/devel ... PERLPLUGIN
Re: RAID Monitoring
Posted: Wed Jan 30, 2013 2:21 pm
by abrist
This command needs to be run locally from the remote (unless you are trying to monitor a RAID array attached to the nagios server). This means you need to setup your command to run through nrpe:
Code: Select all
define command{
command_name disk_health.pl
command_line /usr/lib64/nagios/plugins/check_nrpe -H $HOSTADDRESS$ -c disk_health.pl
}
The plugin needs to be copied to the remote host in the /usr/local/nagios/libexec folder (or whatever plugin folder your remote host uses). It may need sudo permissions (due to smartctl requiring root usually). You then need to define a command directive in the nrpe.cfg file on the remote host.
Re: RAID Monitoring
Posted: Wed Jan 30, 2013 4:46 pm
by theangryheretic
Thanks abrist. Almost done, at least I think it's almost done. I get the following error.
NRPE: Command 'disk_health.pl' not defined
Trying to track it down now.
Thanks again.