The solution is: to use sas2ircu
you can find it there:
http://www.supermicro.com/support/faqs/data_lib/FAQ_9633_SAS2IRCU_Phase_5.0-5.00.00.00.zip
The zip file includes the utility for DOS, Linux PPC, Linux x86 (which will also work on x64), Solaris Sparc and X86, and Windows 32-bit and 64-bit.
i use it with nagios-nrpe server, so i write very-very simple shell script (/usr/local/bin/check_sas2ircu_raid.sh):
#!/bin/shexitstatus=2STATUS=`/usr/local/bin/sas2ircu 0 STATUS |grep "Volume state"`state=`echo "$STATUS"| awk '{ print $4 }'`if [ "$state" = "Optimal" ]thenexitstatus=0fiecho "Volume state: $state"exit $exitstatus
and now, write in nrpe config (for example, /etc/nagios/nrpe_local.cfg )
command[check_raid]=/usr/bin/sudo /usr/local/bin/check_sas2ircu_raid.sh
and finally, add to sudoers file
nagios ALL= NOPASSWD: /usr/local/bin/check_sas2ircu_raid.sh
now you can check raid status with nagios, simply add new service to nagios host config
No comments:
Post a Comment