Freeware and Plugins

Freewaregruppe Monitoring/Nagios-Plugins

check_megaraid_windows

Windows-Plugin: checks the status of LSI/MegaRaid Raid Controller

Description

check_megaraid_windows is a Windows plugin for Nagios which checks the status of LSI/MegaRaid Raid Controller.
The plugin determines the status of Raidsets, RAID controllers and of individual discs (S.M.A.R.T), while all stripe types are supported.

Requirements

The Mega Raid Command line Tool is installed (MegaCLI.exe).

Documentation

Usually you run the plugin with the path to CLI:

C:> check_megaraid_windows path=<path_to_cli>

For debugging purposes, it may also be called with a more detailed output option (this mode is not suitable for continuous operation, but for testing purposes only).

Afterwards it will output the detailed status of the individual components:

C:> check_megaraid_windows path=“C:\Program Files (x86)\MegaRaid Storage Manager\MegaCLI\MegaCLI.exe“ debug

Installation

Preferably the plugin is copied into the script directory where you will store your checks under Windows

When using NSClient ++ an entry in NSC.INI similar to this is generated and pointed to Mega Raid command line tool:

...
[/modules]
NRPEServer=enabled
CheckExternalScripts=enabled

[/settings/NRPE/server] 
allow arguments=true  

[/settings/external scripts/scripts] 
check_megaraid=scripts\check_megaraid_windows.exe path="c:\Program Files (x86)\MegaRAID Storage Manager\MegaCLI\MegaCli.exe"...

Examples

Check MegaRaid Controller, if everything is all right:

C:> check_megaraid_windows.exe path=“C:\Programme\ICP Storage Manager“

RAID OK: Adapter #0: MegaRAID SAS MR9240-4i, Firmware: 2.70.04-0862, BBU: Absent, Virtual Drives (Total: 1, Degraded: 0, Offline: 0), Physical Disks (Total: 2, Critical Disks: 0, Failed Disks: 0), Memory Errors (Correctable: 0, Uncorrectable: 0)

Show the disc in debug mode:

C:\Users\Wartung\Desktop>check_megaraid_windows.exe path="c:\Program Files (x86)\MegaRAID Storage Manager\MegaCLI\MegaCli.exe" action=drives

RAID OK: Virtual Drive: 0 (Target Id: 0): Primary-1, Secondary-0, RAID Level Qualifier-0, Size: 464.729 GB, Number of Drives: 2, State: Optimal

C:\>check_megaraid_windows.exe path="c:\Program Files (x86)\MegaRAID Storage Manager\MegaCLI\MegaCli.exe" action=drives debug

Adapter 0 -- Virtual Drive Information:

Virtual Drive: 0 (Target Id: 0)
Name               :
RAID Level         : Primary-1, Secondary-0, RAID Level Qualifier-0
Size               : 464.729 GB
Mirror Data         : 464.729 GB
State              : Optimal
Strip Size         : 64 KB
Number Of Drives   : 2
Span Depth         : 1
Default Cache Policy: WriteThrough, ReadAheadNone, Direct, No Write Cache if Bad BBU
Current Cache Policy: WriteThrough, ReadAheadNone, Direct, No Write Cache if Bad BBU
Default Access Policy: Read/Write
Current Access Policy: Read/Write
Disk Cache Policy   : Disk's Default
Encryption Type     : None
Is VD Cached: No

Exit Code: 0x00

RAID OK: Virtual Drive: 0 (Target Id: 0): Primary-1, Secondary-0, RAID Level Qualifier-0, Size: 464.729 GB, Number of Drives: 2, State: Optimal

Broken disc (Disc is only in mode “offline”, but can be reactivated):

C:\Users\Wartung\Desktop>check_megaraid_windows.exe path="c:\Program Files (x86)\MegaRAID Storage Manager\MegaCLI\MegaCli.exe" action=adapter

RAID WARNING: Adapter #0: MegaRAID SAS MR9240-4i, Firmware: 2.70.04-0862, BBU: Absent, Virtual Drives (Total: 1, Degraded: 1, Offline: 0), Physical Disks (Total: 2, Critical Disks: 0, Failed Disks: 0), Memory Errors (Correctable: 0, Uncorrectable: 0)

Failure of one disc from a RAID 1 array:

RAID WARNING: Adapter #0: MegaRAID SAS MR9240-4i, Firmware: 2.70.04-0862, BBU: Absent, Virtual Drives (Total: 1, Degraded: 1, Offline: 0), Physical Disks (Total: 1, Critical Disks: 0, Failed Disks: 0), Memory Errors (Correctable: 0, Uncorrectable: 0)

Changelog

2014-06-07
1.1 – Support for .Net 3.5

2014-23-02
1.0 – First public version

Copyright

check_megaraid_windows is licensed under the GNU General Public License.

Author

Joachim Luft will answer your questions to this plugin and is happy about your donation.

Freeware name

check_megaraid_windows

  • System: Nagios Plugins und Addons
  • Date: 07.June 2014
  • Author: Joachim Luft
  • Version: 1.1

Category: Monitoring/Nagios-Plugins

Tags: Windows-Plugin

Download