Utilisation : check_msa_hardware.pl -H [ hostname | IP address ] -C [ SNMP community ]

Attention à ne pas oublier d'activer SNMP sur la baie MSA.

Les capteurs peuvent être des capteurs de température, tension électrique, état des disques durs (par SMART), état des alimentations et plein d'autres choses. L'état des capteurs peut être de type "warning" ou "critical" suivant leur sévérité. Ensuite le pire état est renvoyé à Nagios.

Exemple d'utilisation:

[root@supervision libexec]# ./check_msa_hardware.pl -C public -H 10.1.1.4
HP StorageWorks MSA2012i: Power Supply 2 Voltage, 12V: 1.75V [power-supply]. Power Supply 2 Voltage, 5V: 0.02V [power-supply]. Overall status value: Failed [enclosure]. CRITICAL

L'option --list permet d'afficher toute la liste des capteurs disponibles:

[root@supervision libexec]# ./check_msa_hardware.pl -H 10.1.1.4 -C public --list -v 2
List of probes:
CPU Temperature (Controller Module A) (type: temperature) has status ok with message: 'CPU Temperature (Controller Module A): 50C 122F'
CPU Temperature (Controller Module B) (type: temperature) has status ok with message: 'CPU Temperature (Controller Module B): 49C 120F'
FPGA Temperature (Controller Module A) (type: temperature) has status ok with message: 'FPGA Temperature (Controller Module A): 53C 127F'
FPGA Temperature (Controller Module B) (type: temperature) has status ok with message: 'FPGA Temperature (Controller Module B): 50C 122F'
Onboard Temperature 1 (Controller Module A) (type: temperature) has status ok with message: 'Onboard Temperature 1 (Controller Module A): 36C 97F'
Onboard Temperature 1 (Controller Module B) (type: temperature) has status ok with message: 'Onboard Temperature 1 (Controller Module B): 34C 93F'
Onboard Temperature 2 (Controller Module A) (type: temperature) has status ok with message: 'Onboard Temperature 2 (Controller Module A): 41C 106F'
Onboard Temperature 2 (Controller Module B) (type: temperature) has status ok with message: 'Onboard Temperature 2 (Controller Module B): 36C 97F'
Capacitor Temperature (Controller Module A) (type: temperature) has status ok with message: 'Capacitor Temperature (Controller Module A): 32C 90F'
Capacitor Temperature (Controller Module B) (type: temperature) has status ok with message: 'Capacitor Temperature (Controller Module B): 29C 84F'
CM Temperature, Upper (Controller Module A) (type: temperature) has status ok with message: 'CM Temperature, Upper (Controller Module A): 41C 106F'
CM Temperature, Lower (Controller Module B) (type: temperature) has status ok with message: 'CM Temperature, Lower (Controller Module B): 38C 100F'
Power Supply 1 Temperature (type: temperature) has status ok with message: 'Power Supply 1 Temperature: 37C 99F'
Power Supply 2 Temperature (type: temperature) has status ok with message: 'Power Supply 2 Temperature: 38C 100F'
Capacitor Pack Voltage (Controller Module A) (type: power) has status ok with message: 'Capacitor Pack Voltage (Controller Module A): 8.19V'
Capacitor Pack Voltage (Controller Module B) (type: power) has status ok with message: 'Capacitor Pack Voltage (Controller Module B): 8.19V'
Capacitor Cell 1 Voltage (Controller Module A) (type: power) has status ok with message: 'Capacitor Cell 1 Voltage (Controller Module A): 2.03V'
Capacitor Cell 1 Voltage (Controller Module B) (type: power) has status ok with message: 'Capacitor Cell 1 Voltage (Controller Module B): 2.03V'
Capacitor Cell 2 Voltage (Controller Module A) (type: power) has status ok with message: 'Capacitor Cell 2 Voltage (Controller Module A): 2.03V'
Capacitor Cell 2 Voltage (Controller Module B) (type: power) has status ok with message: 'Capacitor Cell 2 Voltage (Controller Module B): 2.05V'
Capacitor Cell 3 Voltage (Controller Module A) (type: power) has status ok with message: 'Capacitor Cell 3 Voltage (Controller Module A): 2.05V'
Capacitor Cell 3 Voltage (Controller Module B) (type: power) has status ok with message: 'Capacitor Cell 3 Voltage (Controller Module B): 2.03V'
Capacitor Cell 4 Voltage (Controller Module A) (type: power) has status ok with message: 'Capacitor Cell 4 Voltage (Controller Module A): 2.08V'
Capacitor Cell 4 Voltage (Controller Module B) (type: power) has status ok with message: 'Capacitor Cell 4 Voltage (Controller Module B): 2.07V'
Capacitor Charge (Controller Module A) (type: currentValue) has status ok with message: 'Capacitor Charge (Controller Module A): 98%'
Capacitor Charge (Controller Module B) (type: currentValue) has status ok with message: 'Capacitor Charge (Controller Module B): 98%'
Power Supply 1 Voltage, 12V (type: power) has status ok with message: 'Power Supply 1 Voltage, 12V: 12.00V'
Power Supply 1 Voltage, 5V (type: power) has status ok with message: 'Power Supply 1 Voltage, 5V: 5.12V'
Power Supply 1 Voltage, 3.3V (type: power) has status ok with message: 'Power Supply 1 Voltage, 3.3V: 3.48V'
Power Supply 2 Voltage, 12V (type: power) has status ok with message: 'Power Supply 2 Voltage, 12V: 12.04V'
Power Supply 2 Voltage, 5V (type: power) has status ok with message: 'Power Supply 2 Voltage, 5V: 5.15V'
Power Supply 2 Voltage, 3.3V (type: power) has status ok with message: 'Power Supply 2 Voltage, 3.3V: 3.48V'
Overall Unit Status (type: other) has status ok with message: 'Overall status value: OK'
HP StorageWorks MSA2012fc: OK

Remarques:

  • Fonctionne en SNMPv1 et v2
  • Ce plug-in n'est pas compatible avec l'interpréteur perl intégré à Nagios, il faut ainsi utiliser la ligne de commande suivante si vous avez l'erreur "Service check did not exit properly".
define command {
command_name check_msa_sensors
command_line /usr/bin/perl $USER1$/check_msa_hardware.pl -H $HOSTADDRESS$ -C $_HOSTSNMPCOMMUNITY$ -v 2
}

Le plug-in peut-être téléchargé sur Nagios Exchange.