Home Directory Plugins Hardware Storage Systems RAID Controllers Adaptec RAID Check by Anchor Systems

Search Exchange

Search All Sites

Nagios Live Webinars

Let our experts show you how Nagios can help your organization.

Contact Us

Phone: 1-888-NAGIOS-1
Email: sales@nagios.com

Login

Remember Me

Directory Tree

Adaptec RAID Check by Anchor Systems

Rating
5 votes
Favoured:
1
Hits
115916
Files:
FileDescription
check-aacraid.pyThe check script
Nagios CSP

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!
Check the health of an Adaptec raid controller using /usr/StorMan/arcconf Checks the following: Logical device status, Controller status, Failed & Degraded drives. If the battery is present: Charging status, Est of charge time left, Charge left %. And removes the log file "UcliEvt.log" that is dropped into the CWD when /usr/StorMan/arcconf is run.
Check the health of an Adaptec raid controller using /usr/StorMan/arcconf

Checks the following:
Logical device status
Controller status
Failed & Degraded drives

If battery present:
Charging status
Est of charge time left
Charge left %

And removes the log file "UcliEvt.log" that is dropped into the CWD when /usr/StorMan/arcconf is run.

Add this to your "/etc/sudoers" file using visudo
"nagios ALL=(root) NOPASSWD: /usr/StorMan/arcconf GETCONFIG 1 *"

## On RHEL & possibly others ##
Disable "Defaults requiretty" in /etc/sudoers otherwise the command will not run via NRPE.

Add this to your checkcommands.cfg

define command {
command_name check_aacraid
command_line $USER1$/check_nrpe -H $HOSTADDRESS$ -c check_aacraid
}

Add this to your servicedefs.cfg

define service {
use low-service-level
name aacraid-service
service_description aacraid
check_command check_aacraid
register 0
notification_interval 3600
}

Add the service

define service {
use aacraid-service
host_name host-with-crap-adaptec-crud
contact_groups upset-admin
}

And on the host you will be checking add this to nrpe.cfg
command[check_aacraid]=/usr/local/sbin/check-aacraid.py
Reviews (5)
I'm pleased with this update but I had to modify the python code to replace the deprecated classes os.popen4 .

I wish these projects were on github so that we could contribute fixes.
bymwellnitz, December 5, 2011
Good tool. But i got an
check-aacraid.py:47: DeprecationWarning: os.popen4 is deprecated.
check-aacraid.py:60: DeprecationWarning: os.popen4 is deprecated.

Please add this changes:
* after the includes
from subprocess import PIPE, Popen
* change line 47 to:
for line in Popen(["/usr/bin/sudo","/usr/StorMan/arcconf" , "GETCONFIG","1","LD"], stdin=PIPE, stdout=PIPE, close_fds=True).stdout:
* change line 60 to:
for line in Popen(["/usr/bin/sudo","/usr/StorMan/arcconf" , "GETCONFIG","1","AD"], stdin=PIPE, stdout=PIPE, close_fds=True).stdout:

And no Depricated warnungs will appear at ubuntu 10.04 LTS

Thanks for your good tool

PS: switching to WARNING State when Battery is loading creates too much messages. So i deleted that Feature (quick and dirty):
[...]
if bstatus.group(1) == "Charging":
#if check_status
Find a patched version here: https://www.ip6.li/cms/tiki-download_file.php?fileId=46
Thanks for this comprehensive check. I have tweaked the script so that it can also deal with arcconf on Solaris which is located under /opt/StorMan (not /usr/StorMan), plus added a readable version of the Nagios status code to the output.

I don't know how patches are handled around here, so I have uploaded a small patch to

http://pastebin.com/AQQi2GFd

in the meantime. Would you mind merging it?

Sebastian
Thanks for the working and most useful plugin :)

One small suggestion, though.

There is no need for disabling requiretty globally:

Defaults requiretty

Much safer and tighter is to disable requiretty only for the user nagios runs as:

nagios ALL=(root) NOPASSWD: /usr/StorMan/arcconf GETCONFIG 1 *
Defaults:nagios !requiretty