HP MSA P2000 G3 Nagios plugin

Hardware:

1x HP DL380 G7 als Controller
1x MSA P2000 G3 Array (mit Controller)
1x MSA P2000 G3 Array (Expansionbox)

Software:

CentOS 7.5
I/O Multipathing konfiguriert.

HP MSA P2000 G3
HPE DL380G7 + HP MSA P2000 G3

Bei der erstellung des Plugins traten folgende Probleme auf:

  • Das entfernen einer HotSpare HD wurde nicht als Fehler gemeldet
  • ein show fans zeigt keine Ergebnisse
  • switch zwischen den 2 Controller IP’s
  • prüfe Anzahl der HotSpare HDDs

Das Ergebnis:

[root@demo testing]# perl p2000_http_login.pl -H10.154.2.1 -umanage -p\!manage
Systemstatus: Storage1 HP P2000 G3 SAS MSA Storage OK

oder im debug Mode: (-d1)

[root@demo testing]# perl p2000_http_login.pl -H10.154.2.1 -S10.154.3.1 -umanage -p\!manage -d1

==> Device: Storage1 HP P2000 G3 SAS MSA Storage || Contact: IT Nerds || Location: SinCity, Bad Place ,Germany <==

Debugmode ON

vdisks:
vdisk: vd01 is online. vdisk: vd02 is online. Status: 0

PS:
Enclosure 1 PSU 1, Left OK. Enclosure 1 PSU 2, Right OK. Enclosure 2 PSU 1, Left OK. Enclosure 2 PSU 2, Right OK. Status: 0

FAN:
Enclosure 1 – Left fan_1.1 is OK. Enclosure 1 – Right fan_1.2 is OK. Enclosure 2 – Left fan_2.1 is OK. Enclosure 2 – Right fan_2.2 is OK. Status: 0

SAS:
Enclosure 1 expport_out1_a1 is OK. Enclosure 1 expport_out1_b1 is OK. Enclosure 2 expport_out1_a2 not connected. Enclosure 2 expport_in1_a2 is OK. Enclosure 2 expport_out1_b2 not connected. Enclosure 2 expport_in1_b2 is OK. Status: 0

HDD:
Enclosure 1 disk_1.1 is OK. Enclosure 1 disk_1.2 is OK. Enclosure 1 disk_1.3 is OK. Enclosure 1 disk_1.4 is OK. Enclosure 1 disk_1.5 is OK. Enclosure 1 disk_1.6 is OK. Enclosure 1 disk_1.7 is OK. Enclosure 1 disk_1.8 is OK. Enclosure 1 disk_1.9 is OK. Enclosure 1 disk_1.10 is OK. Enclosure 1 disk_1.11 is OK. Enclosure 1 disk_1.12 is OK. Enclosure 2 disk_2.1 is OK. Enclosure 2 disk_2.2 is OK. Enclosure 2 disk_2.3 is OK. Enclosure 2 disk_2.4 is OK. Enclosure 2 disk_2.5 is OK. Enclosure 2 disk_2.6 is OK. Enclosure 2 disk_2.7 is OK. Enclosure 2 disk_2.8 is OK. Enclosure 2 disk_2.9 is OK. Enclosure 2 disk_2.10 is OK. Enclosure 2 disk_2.11 is OK. Enclosure 2 disk_2.12 is OK. Status: 0

VDISK SP online:
2 Disks Online

Management Interfaces:
Controller: 10.154.2.1 OK
Controller: 10.154.3.1 OK

Systemstatus: Storage1 HP P2000 G3 SAS MSA Storage OK

Folgende Komponeneten werden überprüft:

  • vdisks => virtuelle disks
  • PS => Power Supplies
  • FAN => Lüftermodule
  • SAS => SAS Connection zum Array / Expansion
  • HDD => Die HDDs im Array
  • VDISK SP => konfigurierte Spare Disks
  • Controller Interfaces

Die Commandline Parameter:

perl p2000_http_login.pl -h
———- HELP ————
p2000_http_login.pl
Usage: p2000_http_login.pl -H<Controller> -u<username> -p<password> -S<SpareController> -d<0|1>
Example: p2000_http_login.pl -H10.154.2.1 -umanage -p’!manage’
option -H = Controller IP, example: -H10.154.2,1
option -u = username, example: -umanage
option -p = password, example: -p\!manage
option -d = Debugmode, shows complete output. -d0 = debug off; -d1 = debug on
option -S = Spare Controller, example: -S10.154.3.1

Nagios Konfiguration:

(als NRPE Service definiert)
Host demo01.myorg.com = HP DL380G7 (Controllerhost)

(Alle Pfade sind von unserem CentOS 7.x System)

/etc/nagios/objects/storage/myArray01.cfg

define service {
          use                          generic-service
          host_name                    demo01.myorg.com
          service_description          check_Array
          check_command                check_nrpe!Check_array_demo01
}

/etc/nagios/objexts/commands.cfg :

# check_nrpe command definition // timeout -t = 30sec.
define command{
         command_name      check_nrpe
         command_line      $USER1$/check_nrpe -H $HOSTADDRESS$ -t30 -p 5666 -c $ARG1$
}

Host demo01.myorg.com

Firewall ? Port 5666 erforderlich !

/etc/nagios/nrpe.cfg

# Check Storage Array #
command[Check_array_demo01]=sudo /usr/lib64/nagios/plugins/p2000_http_login.pl -H10.154.2.1 -S10.154.3.1 -umanage -p\!manage

service nagios restart
service nrpe restart

Download Skript:

p2000_http_login.zip

HP MSA P2000 G3 + Nagios
Markiert in:             

Schreibe einen Kommentar

Deine E-Mail-Adresse wird nicht veröffentlicht. Erforderliche Felder sind mit * markiert.