Build precise queries to find exactly what you need
Press ESC to close
Your review has been submitted and is pending approval.
Modified original check_3ware script to allow monitoring on remote server with SSH.
Current Version
Last Release Date
June 11, 2009
Owner
Nagios Exchange
Website
http://www.lorientech.com/
the script
The original p_view=289 check_3ware">http://www.nagiosexchange.org/RAID_Controller.58.0.html?&tx_netnagext_pi1p_view=289 check_3ware Perl script works well but I didn't feel like installing nagios on the servers just for one service. Solution: modify the script to run the commands over SSH. This requires a little more setup on your part, though less than setting up nagios :).
Usage: 1) Download tw_cli from 3ware's website, install on remote host(s). Make sure you have the right version, might take a few tries to find it.
2) Create //nagios// user on remote host, with home directory.
3) On remote host, edit ///etc/sudoers//. Add the following line to allow nagios to execute tw_cli as root: **{{nagios ALL=NOPASSWD: /usr/bin/tw_cli}}**
4) On local (monitoring) host, generate an authentication key: **{{$ su - nagios}}** **{{$ ssh-keygen}}**
5) Copy the authentication key to the remote host: **{{$ scp /home/nagios/.ssh/id_rsa [email protected]:/home/nagios/.ssh/authorized_keys}}**
**- Note: above command assumes the //authorized_keys// file doesn't exist! If it does, you will want to append it.**
6) You can now run the script on a remote host as root with the nagios user on the local (monitoring) host: **{{$ ./check_3ware -C 0 -U 0 -H 192.168.1.15 -u nagios}}**
7) Here's how it looks in //checkcommands.cfg//: **{{$USER1$/check_3ware -C $ARG1$ -U $ARG2$ -H $HOSTADDRESS$ -u nagios}}**
**Q:** Why not use check_by_ssh? **A:** I would rather have the script in one place rather than on all the servers. Makes maintenance easier. **A:** I've had problems with check_by_ssh. Of course, that could be attributed to my stupidity ;)
**Q:** Do I need //both// scripts, one for local, the other for ssh? **A:** No, to check local, just omit the {{-H}} and {{-u}} options.
- //ianar? s?vi//
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.
You must be logged in to submit a review.
To:
From:
We’ve completely redesigned the world’s largest repository of Nagios plugins and monitoring tools. Join thousands of users sharing monitoring solutions for servers, applications, and everything in between.
Due to our redesign, all existing accounts require a password reset to access your account again.
Ready to explore 6,100+ projects and contribute to the community?
Reset Password Create Account
Happy Monitoring!