RAID Controllers

check_3ware-raid.pl

Description:

Yet another way to check state of your physical disks and your logical units of your 3ware RAID card

Current Version

Last Release Date

February 4, 2010

Compatible With


Project Files
Project Notes
How to use : 1 to use this script you have to install firt tw_cli. You can find the source here : http://www.3ware.com/support/download.asp just follow the instructions to compile and deploy it 2 then you just have to run the following command : $ ./check_3ware-raid.pl --help If you need to use this script with NRPE you just have to do the following steps : 1 allow your user to run the script with the sudo rights. Just add something like that in your /etc/sudoers (use visudo) : nagios ALL=(ALL) NOPASSWD: //check_3ware-raid.pl 2 then just add this kind of line in your NRPE config file : command[check_3ware]=/usr/bin/sudo //check_3ware-raid.pl 3 don't forget to restart your NRPE daemon Examples : # ./check_3ware-raid.pl -P /usr/sbin/tw_cli -a unit_check -p -v -m DEBUG : action : unit_check, path-tw_cli : /usr/sbin/tw_cli DEBUG : check if /usr/sbin/tw_cli exists and is executable DEBUG : warning threshold : 1, critical threshold : 2 DEBUG : controller : DEBUG : action = unit_check DEBUG : disk u0/type RAID-1/status OK DEBUG : disk u1/type RAID-1/status OK DEBUG : disk u2/type SPARE/status OK CHECK 3ware RAID - unit_check - OK - 3 unit(s) detected as OK - (u0,RAID-1,OK) (u1,RAID-1,OK) (u2,SPARE,OK) | unitOK=3 unitREBUILD=0 unitNOK=0 Help : # ./check_3ware-raid.pl --help check_3ware-raid.pl version 0.1 by Erwan Labynocle Ben Souiden This plugin checks state of your physical disks and logical units of a 3ware RAID card. Usage: //check_3ware-raid.pl [-a unit_check|disk_check] [-p] [-D "CHECK 3ware RAID - "] [-v] [-m] [-c 2] [-w 1] [-C /c1] Options: -h, --help Print detailed help screen -V, --version Print version information -D, --display=STRING to modify the output display... default is "CHECK 3ware RAID - " -P, --path-tw_cli=STRING specify the path to the tw_cli binary default value is /usr/sbin/tw_cli -a, --action=STRING specify the action : unit_check|disk_check default is disk_check disk_check : display state of all physical disks unit_check : display state of all logical unit -C, --controller=STRING allow you to specify only one controller to check the default behavior is to check each time every controller -c, --critical=INT specify a critical threshold for the number of disks in a non-OK state. default is 2 only for the disk_check action -w, --warning=INT specify a warning threshold for the number of disks in a non-OK state. default is 1 only for the disk_check action -m, --more Print a longer output. By default, the output is not complet because Nagios may truncate it. This option is just for you -p, --perfdata If you want to activate the perfdata output -v, --verbose Show details for command-line debugging (Nagios may truncate the output) Send email to erwan@aleikoum.net if you have questions regarding use of this software. To submit patches or suggest improvements, send email to erwan@aleikoum.net This plugin has been created by Erwan Labynocle Ben Souiden Hope you will enjoy it ;)
Reviews (1) Add a Review
Got it working on Windows Server with a few changes
by rgenergy, January 31, 2014

Got this plugin working on our Windows Server 2008 R2 with 3ware LSI 9750-4i, NSClient++, Strawberry Perl, and tw_cli.exe. 1. Install/save tw_cli.exe to C:CLI 2. Save check_3ware-raid.pl to C:CLI 3. Open check_3ware-raid.pl with notepad 4. Change: my $tw_cli_path = '/usr/sbin/tw_cli'; to: my $tw_cli_path = 'C:CLItw_cli.exe'; 5. Install strawberry perl on Windows. 6. Install NSCLient++ on Windows. 7. Go to the NSCLient++ installion directory (C:\NSCLient++). On nsclient.ini change/add the following: CheckExternalScripts = 1 [CheckExternalScripts] allow arguments=1 [/settings/external scripts/scripts] check_3ware=C:\strawberry\perl\bin\perl.exe C:\CLI\check_3ware-raid.pl 8. Restart NSClient. ------------------------------------------------------------------- 9. On your nagios server in the command.cfg add the following: # Ex. /usr/lib64/nagios/plugins/check_nrpe -H 10.0.42.28 -c check_3ware define command{ command_name check_3ware command_line $USER1$/check_nrpe -H $HOSTADDRESS$ -c check_3ware } 10. Add the following to your server.cfg file # Check Windows2k8 3ware RAID # /usr/lib64/nagios/plugins/check_nrpe -H 10.0.42.28 -c check_3ware define service{ use generic-service host_name Windows2k8 service_description 3ware RAID check_command check_3ware }



Add a Review

You must be logged in to submit a review.

Thank you for your review!

Your review has been submitted and is pending approval.

Recommend

To:


From:


Thank you for your recommendation!

Your recommendation has been sent.

Project Stats
Rating
5 (3)
Favorites
0
Views
179,358