Home Directory Plugins Hardware Server Hardware HP (Compaq) Powershell NRPE NSClient script for HP SmartArray check

Powershell NRPE NSClient script for HP SmartArray check

Bookmark and Share

Rating
4 votes
Favoured:
1
Current Version
1.0
Last Release Date
2012-09-02
Compatible With
  • Nagios 2.x
  • Nagios 3.x
Owner
License
GPL
Hits
20853
Files:
FileDescription
check_smartarray.ps1check_smartarray.ps1
Powershell script to check HP SmartArray RAID status on Windows
Powershell script to check HP Smart Array RAID status on Windows

Because the Hpacucli takes long time to execute, when you call it for each drive thats become conflicting while adding drives to enclosure.
I don't find a script thats pleased me so i developped it.

All can use, copy, redistribute, modify and improve it.
But please, respect the 'AUTHOR' & 'VERSION' lines (append your's to the list, mandatory).


Checks :
- Physical drives status
- Logical drives status
- Compatible with multiple Arrays

Future improvements (all suggestions and dev. are welcome) :
- Compatibility with multiple HP Smart Array controllers
- Properly handle NRPE's 1024b limitation in return packet
- Some other ...

NSClient++ config :
- Copy check_smartarray.ps1 to NSCLient++ scripts folder
- Set Powershell execution policy to 'Set-ExecutionPolicy Unrestricted'
- Append to NSC.ini : 'check_raid=cmd /c echo scripts/check_smartarray.ps1; exit $LastExitCode | powershell.exe -Command -'
- Restart NSClient++ service

Nagios config example with nrpe-check :
define service {
use critical-service
host_name MyWindowsServer
service_description RAID Status
check_command check_nrpe!check_raid
}

define command {
command_name check_raid
command_line $USER1$/check_nrpe -H $HOSTADDRESS$ -t 30 -c check_raid
}
Reviews (3)
Returns OK but status information show:

"Cannot index into a null array."

Looking forward to an updated version!
Owner's reply

Hi,

Thanks for the feedback.
I can't reproduce the error so can you uncomment #164 & #170 lines and send me the result by mail (my mail is in the script header) ?

Regards,

byterat, March 11, 2013
Same error here.
byclarkus978, March 6, 2013
When run against my server, Nagios is reporting the following under Status Information:

The string starting:
At line:1 char:2
+ -
cordException
+ FullyQualifiedErrorId : TerminatorExpectedAtEndOfString

At least it returns with a Status of 'OK'
Owner's reply

Hi,

I'm trying to reproduce the error but i can't.

Did you modify the path of 'hpacucli' program in the script ? Or anything else ?

Can you uncomment the lines 164 & 170 and send me the result by mail (you can find my mail addr. in the header) ?

Thank you.