leibler / check_mk-sas2ircu

Check_MK Check for SAS2IRCU Raid Controller used in Dell R200 Server
2 stars 3 forks source link

Multiple volumes aren't delimited by an empty line like hard drives. #2

Closed mdkent closed 9 years ago

mdkent commented 9 years ago

Thanks for the handy plugin, it's working well except for a small bug in detecting multiple volumes. Here's some sample output:

LSI Corporation SAS2 IR Configuration Utility.
Version 20.00.00.00 (2014.09.18)
Copyright (c) 2008-2014 LSI Corporation. All rights reserved.

Read configuration has been initiated for controller 0
------------------------------------------------------------------------
Controller information
------------------------------------------------------------------------
  Controller type                         : SAS2008
  BIOS version                            : 7.29.00.00
  Firmware version                        : 15.00.00.00
  Channel description                     : 1 Serial Attached SCSI
  Initiator ID                            : 0
  Maximum physical devices                : 255
  Concurrent commands supported           : 1720
  Slot                                    : 0
  Segment                                 : 0
  Bus                                     : 130
  Device                                  : 0
  Function                                : 0
  RAID Support                            : Yes
------------------------------------------------------------------------
IR Volume information
------------------------------------------------------------------------
IR volume 1
  Volume ID                               : 285
  Status of volume                        : Okay (OKY)
  Volume wwid                             : 0ef025a40e082b5e
  RAID level                              : RAID10
  Size (in MB)                            : 974654
  Physical hard disks                     :
  PHY[0] Enclosure#/Slot#                 : 1:0
  PHY[1] Enclosure#/Slot#                 : 1:1
  PHY[2] Enclosure#/Slot#                 : 1:6
  PHY[3] Enclosure#/Slot#                 : 1:7
IR volume 2
  Volume ID                               : 286
  Status of volume                        : Okay (OKY)
  Volume wwid                             : 0c1cfe9563e503e1
  RAID level                              : RAID1
  Size (in MB)                            : 151634
  Physical hard disks                     :
  PHY[0] Enclosure#/Slot#                 : 1:2
  PHY[1] Enclosure#/Slot#                 : 1:3
------------------------------------------------------------------------
Physical device information
------------------------------------------------------------------------
Initiator at ID #0

Device is a Hard disk
  Enclosure #                             : 1
  Slot #                                  : 0
  SAS Address                             : 4433221-1-0300-0000
  State                                   : Optimal (OPT)
  Size (in MB)/(in sectors)               : 488386/1000215215
  Manufacturer                            : ATA
  Model Number                            : M4-CT512M4SSD2
  Firmware Revision                       : 040H
  Serial No                               : 000000001247091F77EE
  GUID                                    : 500a0751091f77ee
  Protocol                                : SATA
  Drive Type                              : SATA_SSD

Device is a Hard disk
  Enclosure #                             : 1
  Slot #                                  : 1
  SAS Address                             : 4433221-1-0200-0000
  State                                   : Optimal (OPT)
  Size (in MB)/(in sectors)               : 488386/1000215215
  Manufacturer                            : ATA
  Model Number                            : M4-CT512M4SSD2
  Firmware Revision                       : 040H
  Serial No                               : 000000001247091F77DD
  GUID                                    : 500a0751091f77dd
  Protocol                                : SATA
  Drive Type                              : SATA_SSD

Device is a Hard disk
  Enclosure #                             : 1
  Slot #                                  : 2
  SAS Address                             : 4433221-1-0100-0000
  State                                   : Optimal (OPT)
  Size (in MB)/(in sectors)               : 152627/312581807
  Manufacturer                            : ATA
  Model Number                            : INTEL SSDSA2BW16
  Firmware Revision                       : 0362
  Serial No                               : BTPR223105FW160DGN
  GUID                                    : 5001517972e6f64c
  Protocol                                : SATA
  Drive Type                              : SATA_SSD

Device is a Hard disk
  Enclosure #                             : 1
  Slot #                                  : 3
  SAS Address                             : 4433221-1-0000-0000
  State                                   : Optimal (OPT)
  Size (in MB)/(in sectors)               : 152627/312581807
  Manufacturer                            : ATA
  Model Number                            : INTEL SSDSA2BW16
  Firmware Revision                       : 0362
  Serial No                               : BTPR223402KJ160DGN
  GUID                                    : 5001517972e70c9c
  Protocol                                : SATA
  Drive Type                              : SATA_SSD

Device is a Hard disk
  Enclosure #                             : 1
  Slot #                                  : 6
  SAS Address                             : 4433221-1-0500-0000
  State                                   : Optimal (OPT)
  Size (in MB)/(in sectors)               : 488386/1000215215
  Manufacturer                            : ATA
  Model Number                            : M4-CT512M4SSD2
  Firmware Revision                       : 040H
  Serial No                               : 000000001249091FB57C
  GUID                                    : 500a0751091fb57c
  Protocol                                : SATA
  Drive Type                              : SATA_SSD

Device is a Hard disk
  Enclosure #                             : 1
  Slot #                                  : 7
  SAS Address                             : 4433221-1-0400-0000
  State                                   : Optimal (OPT)
  Size (in MB)/(in sectors)               : 488386/1000215215
  Manufacturer                            : ATA
  Model Number                            : M4-CT512M4SSD2
  Firmware Revision                       : 040H
  Serial No                               : 000000001247091F7753
  GUID                                    : 500a0751091f7753
  Protocol                                : SATA
  Drive Type                              : SATA_SSD
------------------------------------------------------------------------
Enclosure information
------------------------------------------------------------------------
  Enclosure#                              : 1
  Logical ID                              : 500a0d10:005bc9c0
  Numslots                                : 8
  StartSlot                               : 0
------------------------------------------------------------------------
SAS2IRCU: Command DISPLAY Completed Successfully.
SAS2IRCU: Utility Completed Successfully.

as you can see the volumes aren't separated by lines like hard drives, so we need something to indicate the end of the volume entry.