PlanetIT.WS - Beta

Welcome, Guest

Search: Advanced

Home » Monitoring » Nagios » Nagios plugin: Check Smartarray - Windows NRPE plugin

Nagios plugin: Check Smartarray - Windows NRPE plugin Print View

Article Stats:
Submitted by: alex
Date: 2010-04-09 00:18:48
Views: 1369
Rating: 5.00

Download (from my Google code project)

Script Name: check_smartarray.vbs
Usage Syntax: cscript.exe //NoLogo check_smartarray.vbs [--hpacucli PATH|-h]
Author: Alex Simenduev, PlanetIT.WS (http://www.planetit.ws)
Version: 1.0.1
LastModified: 25/08/2008

Description:
Checks the status of HP Smart Array Controller Series by using "hpacucli.exe", the produced output is compatible with Nagios. The script assumes that "hpacucli.exe" is in the path, if it is not you can specify the path in command line argument (only version 1.0.1 and up) or modify the global variable in the script that responable for the "hpacucli.exe" location, the name of the variable is: "gsHpacucliPath".
Default Exit code is 3 (UNKNOWN)

Note:
This script is based on the BASH shell script taken from HP forum:
http://forums12.itrc.hp.com/service/forums/questionanswer.do?threadId=1128853

IMPORTANT:Make sure you using a latest version of "HP Array Configuration Utility CLI"

License:

- This script is supplied as-is without any support, I hope it works for you.
- You free to modify/distribute this script as you wish, but you must have the folowing line in the script:
  Original author Alex Simenduev, PlanetIT.WS (http://www.planetit.ws)

Change Log:

   Legend:
      [*] Informational, [!] Bugix, [+] Added, [-] Removed


   Version 1.0.1:
      [+] Added constant for script version
      [+] Added commandline arguments, use "-h" for usage help
      [*] Other small/minor changes

   Version 1.0b:
      [!] Fixed a bug when another instance of ACU is running, a warning state will be produced in such situation.

   Version 0.9b:
      [*] Initial release.


Comments

Jun 10th 2010, by Guest
The file "check_smartarray.vbs" is empty by download (0 KB, http://www.monitoringexchange.org). Date: 10.06.2010

Jun 10th 2010, by alex
Jun 10th 2010, by Guest
The file "check_smartarray.vbs" is empty by download (0 KB, http://www.monitoringexchange.org). Date: 10.06.2010

Re-uploaded the file, try again...
---
View Alex Simenduev's LinkedIn profileView my profile

May 9th 2011, by Guest
C:\install\hp>cscript.exe //NoLogo //T:10 check_smartarray.vbs --hpacucli c:\ins
tall\hp
CRITICAL - MSA500 G2 in 212PLYPN44 -/OK/OK (LD 1: OK [(1:1 OK) (1:2 OK) (1:3 OK)
(1:4 OK) (1:5 OK) (1:6 OK)])Smart Array 642 in Slot 2 -/Not Configured/OK (LD :
[])Smart Array 6i in Slot 0 (Embedded) -/OK/OK (LD 1: OK [(1:2 OK) (1:3 OK)],
LD 2: OK [(2:0 OK)])

Critical with external MSA (all status OK, but no slot name?)

May 9th 2011, by Guest
=> ctrl all show

MSA500 G2 in 212PLYPN44 (sn: P734C0BX3R900I, csn: 212PLYPN44
)
Smart Array 642 in Slot 2 (sn: P5A8A0N9SR70X5)
Smart Array 6i in Slot 0 (Embedded)

=>
or caused by two strokes output?

May 9th 2011, by alex
The disks on Smart Array 642 in Slot 2 are not configured, no Logical drives. that's why it's critical
---
View Alex Simenduev's LinkedIn profileView my profile

May 9th 2011, by Guest
Oh, tnx for fast answer! MSA500 G2 connected to Smart Array 642, thats why it not configured, how to skip "Not configured" check?

May 9th 2011, by Guest
Sorry, got it, vbs is not so hard :)

Sub set_exit_status(pStatus)
If pStatus = "OK" Then
If giExitStatus > STATE_CRITICAL Then
giExitStatus = STATE_OK
End If
ElseIf pStatus = "Not Configured" Then
If giExitStatus STATE_CRITICAL Then
giExitStatus = STATE_OK
End If
ElseIf pStatus = "Predictive Failure" Then
If giExitStatus STATE_CRITICAL Then
giExitStatus = STATE_WARNING
End If

Else
giExitStatus = STATE_CRITICAL
End If
End Sub

Jul 5th 2011, by Guest
I really appreciate the efforts you have put in writing such a great post.You are doing a fine job.Keepb logging.


Add Comment



Enter the code shown:

Visual CAPTCHA