Good script. Works with FreeBSD.

Nice simple check. The Perl code is readable.

The script provides options which let you specify the specific Controller and specific Unit.

I prefer to use NRPE, NSCA or check_by_ssh to check my remote hosts, and the built-in SSH seems redundant. This is just my preference.

I’m testing this on FreeBSD 7.2 (By changing the path) with a 3ware 9000 series. It seems to work fine. I’ll probably use it on some CentOS 5.4 machines shortly.

Some issues:

1. I need to specify the specific Unit (e.g “check_3ware.pl –controller 0 –unit 1”), otherwise this script only checks Unit 0.

2. The script has a list of keywords for the WARNING and OK states. Anything else becomes CRITICAL. If the array shows a “DEGRADED” or OFFLINE message, this script will consider that a WARNING. Really, the script should specify OK, WARNING and CRITICAL states. Anything else should become UNKNOWN.

It’s easy enough to change the OK and WARNING criteria by adding them to the @state_ok & @state_warning Perl arrays.