RAID Monitoring

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
theangryheretic
Posts: 15
Joined: Fri Feb 24, 2012 4:51 pm

RAID Monitoring

Post 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.
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: RAID Monitoring

Post 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.
theangryheretic
Posts: 15
Joined: Fri Feb 24, 2012 4:51 pm

Re: RAID Monitoring

Post 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.
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: RAID Monitoring

Post by abrist »

You will want to use nrpe to run these checks remotely (locally on the remote hosts).
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
theangryheretic
Posts: 15
Joined: Fri Feb 24, 2012 4:51 pm

Re: RAID Monitoring

Post 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.
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: RAID Monitoring

Post 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?
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
theangryheretic
Posts: 15
Joined: Fri Feb 24, 2012 4:51 pm

Re: RAID Monitoring

Post 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.
Attachments
disk_health.pl
(22.06 KiB) Downloaded 472 times
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: RAID Monitoring

Post 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
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: RAID Monitoring

Post 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.
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
theangryheretic
Posts: 15
Joined: Fri Feb 24, 2012 4:51 pm

Re: RAID Monitoring

Post 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.
Locked