Nagios 3ware

From Roedie's Brain
Jump to: navigation, search

What is it?

check_3ware.sh is a small bash script for use with Nagios or any compatible monitoring system. It depends heavily on Bash and on the 3ware tool tw_cli. Right now it monitors the state of all your arrays (units). It doesn't take any command line options, it just monitors everything it finds. If your controller has a BBU it will also be monitored.

How do I use it?

Well, it's quite easy. Just download the tarball and unpack it. Put the check_3ware.sh script somewhere you like and make a command that executes the plugin. I use the check_by_ssh plugin to execute it. The script must be run as root because tw_cli needs root privileges. I use something like:

define command {
       command_name check_3ware
       command_line /usr/lib/nagios/plugins/check_by_ssh -H $HOSTADDRESS$ \
                    -i /etc/nagios2/config.d/etc/ssh/$HOSTNAME$.id -l <username> -t 25 \
                    -C 'sudo check_3ware.sh'
}

Where do I get it?

Well, you can download it here:

stable

http://www.roedie.nl/downloads/check_3ware/check_3ware-20120204.tar.bz2

development

none currently

Any planned features?

  • Let it accept command line options to tell it which controllers, raid sets and bbu's to monitor
  • Definitely rewrite the code. It's a mess now.
  • Rewrite in perl? The code has *a lot* of bashisms in it right now.