- ConSol* Labs - http://labs.consol.de -
check_hpasm
Posted By lausser On 15 July 2009 @ 0:23 In | Comments Disabled
check_hpasm ist ein Plugin für Nagios, das den Zustand der Hardware von Hewlett-Packard Proliant Servern prüft. Voraussetzung ist die Installation des hpasm-Pakets. Das Plugin ermittelt den Zustand von
und warnt bzw. alarmiert, wenn eine dieser Komponenten ausgefallen ist oder außerhalb der normalen Schwellwerte arbeitet.
Es gibt zwei Betriebsarten des Plugins:
nagios$ check_hpasm OK - hardware working fine nagios$ check_hpasm -H 10.0.73.30 -C public OK - hardware working fine nagios$ check_hpasm -H 10.0.73.30 -C public -P 1 OK - hardware working fine nagios$ check_hpasm -H 10.0.73.30 -C public --snmpwalk /usr/bin/snmpwalk OK - hardware working fine |

Zu Debuggingzwecken kann das Plugin auch mit der Option −−verbose (bzw. -v) aufgerufen werden. Es werden dann detailliert die Stati der einzelnen Hardwarekomponenten ausgegeben.
nagios$ check_hpasm -v CRITICAL - dimm module 0:5 (module 5 @ cartridge 0) needs attention (degraded), System: 'proliant dl360 g5', S/N: '3UH841N09K', ROM: 'P58 08/03/2008' checking cpus cpu 0 is ok cpu 1 is ok checking power supplies powersupply 1 is ok powersupply 2 is ok checking fans fan 1 is present, speed is normal, pctmax is 50%, location is powerSupply, redundance is redundant, partner is 2 fan 2 is present, speed is normal, pctmax is 50%, location is cpu, redundance is redundant, partner is 3 fan 3 is present, speed is normal, pctmax is 50%, location is cpu, redundance is redundant, partner is 1 checking temperatures 1 ioBoard temperature is 42C (65 max) 2 ambient temperature is 18C (40 max) 3 cpu temperature is 30C (95 max) 4 cpu temperature is 30C (95 max) 5 powerSupply temperature is 29C (60 max) checking memory dimm module 0:1 (module 1 @ cartridge 0) is ok dimm module 0:2 (module 2 @ cartridge 0) is ok dimm module 0:3 (module 3 @ cartridge 0) is ok dimm module 0:4 (module 4 @ cartridge 0) is ok dimm module 0:5 (module 5 @ cartridge 0) needs attention (degraded) dimm module 0:6 (module 6 @ cartridge 0) is ok dimm module 0:7 (module 7 @ cartridge 0) is ok dimm module 0:8 (module 8 @ cartridge 0) is ok checking disk subsystem da controller 0 in slot 0 is ok controller accelerator is ok controller accelerator battery is ok logical drive 0:1 is ok (distribDataGuard) physical drive 0:0 is ok physical drive 0:1 is ok physical drive 0:2 is ok physical drive 0:3 is ok physical drive 0:4 is ok physical drive 0:5 is ok | fan_1=50% fan_2=50% fan_3=50% temp_1_ioBoard=42;65;65 temp_2_ambient=18;40;40 temp_3_cpu=30;95;95 temp_4_cpu=30;95;95 temp_5_powerSupply=29;60;60 |
–verbose (bzw. -v) kann mehrmals angegeben werden oder ein numerisches Argument erhalten. Die höchste Stufe ist -vvv. Mit dieser Einstellung erhält man einen kompletten Dump der verbauten Komponenten mit allen Details.
nagios$ check_hpasm -vvv ... [CPU_0] cpqSeCpuSlot: 0 cpqSeCpuUnitIndex: 0 cpqSeCpuName: Intel Xeon cpqSeCpuStatus: ok info: cpu 0 is ok [PS_1] cpqHeFltTolPowerSupplyBay: 1 cpqHeFltTolPowerSupplyChassis: 0 cpqHeFltTolPowerSupplyPresent: present cpqHeFltTolPowerSupplyCondition: ok cpqHeFltTolPowerSupplyRedundant: redundant info: powersupply 1 is ok ... [FAN_1] cpqHeFltTolFanChassis: 1 cpqHeFltTolFanIndex: 1 cpqHeFltTolFanLocale: powerSupply cpqHeFltTolFanPresent: present cpqHeFltTolFanType: spinDetect cpqHeFltTolFanSpeed: normal cpqHeFltTolFanRedundant: redundant cpqHeFltTolFanRedundantPartner: 2 cpqHeFltTolFanCondition: ok cpqHeFltTolFanHotPlug: nonHotPluggable info: fan 1 is present, speed is normal, pctmax is 50%, location is powerSupply, redundance is redundant, partner is 2 ... [PHYSICAL_DRIVE] cpqDaPhyDrvCntlrIndex: 0 cpqDaPhyDrvIndex: 4 cpqDaPhyDrvBay: 5 cpqDaPhyDrvBusNumber: 1 cpqDaPhyDrvSize: 1864 cpqDaPhyDrvStatus: ok cpqDaPhyDrvCondition: ok ... |
Wenn ausgefallene/fehlende Komponenten ausgeblendet werden sollen, so dass sie keinen Alarm auslösen können, benutzt man die Option –blacklist. Man übergibt dem Plugin mit dieser Option eine durch / getrennte Liste von Komponenten folgenden Formats:
<typ>:<nr>[,<nr>...][/<typ>:<nr>[,<nr>...]]…
wobei für <typ> jeweils eines der folgenden Kürzel steht:
| cpu | c |
| powersupply | p |
| fan | f |
| overall fan status | ofs |
| temperature | t |
| dimm | d |
| da controller | daco |
| da controller accelerator | daac |
| da controller accelerator battery | daacb |
| da logical drive | dald |
| da physical drive | dapd |
| scsi controller | scco |
| scsi logical drive | scld |
| scsi physical drive | scpd |
| fcal controller | fcaco |
| fcal accelerator | fcaac |
| fcal host controller | fcahc |
| fcal host controller overall condition | fcahco |
| fcal logical drive | fcald |
| fcal physical drive | fcapd |
| fuse | fu |
| enclosure manager | em |
| iml-event | evt |
Die <nr> der entsprechenden Komponente erhält man, wenn check_hpasm mit -v aufgerufen wird.
checking cpus cpu 0 is ok | c:0 cpu 1 is ok | c:1 checking power supplies powersupply 1 is ok | p:1 powersupply 2 is ok | p:2 checking fans fan 1 is present, speed is normal, .... | f:1 fan 2 is present, speed is normal, .... | f:2 fan 3 is present, speed is normal, .... | f:3 overall fan status: fan=ok, cpu=ok checking temperatures 1 ioBoard temperature is 42C (65 max) | t:1 2 ambient temperature is 18C (40 max) | t:2 3 cpu temperature is 30C (95 max) | t:3 4 cpu temperature is 30C (95 max) | t:4 5 powerSupply temperature is 29C (60 max) | t:5 checking memory dimm module 0:1 (module 1 @ cartridge 0) is ok | d:0:1 dimm module 0:2 (module 2 @ cartridge 0) is ok | d:0:2 dimm module 0:3 (module 3 @ cartridge 0) is ok | d:0:3 dimm module 0:4 (module 4 @ cartridge 0) is ok | d:0:4 dimm module 0:5 (module 5 @ cartridge 0) needs attention (degraded) | d:0:5 dimm module 0:6 (module 6 @ cartridge 0) is ok | d:0:6 dimm module 0:7 (module 7 @ cartridge 0) is ok | d:0:7 dimm module 0:8 (module 8 @ cartridge 0) is ok | d:0:8 checking disk subsystem da controller 3 in slot 0 is ok | daco:3 controller accelerator is ok | daac:3 controller accelerator battery is ok | daacb:3 logical drive 3:1 is ok (mirroring) | dald:3:1 logical drive 3:2 is ok (mirroring) | dald:3:2 physical drive 3:0 is ok | dapd:3:0 physical drive 3:1 is ok | dapd:3:1 physical drive 3:2 is ok | dapd:3:2 physical drive 3:3 is ok | dapd:3:3 ide controller 0 in slot -1 is ok and unused | ideco:0 fcal controller 1:0 in box 1/slot 0 needs attention (degraded) | fcaco:1:0 fcal accelerator in box 1/slot 0 is temp disabled | fcac:1:0 logical drive 1:1 is failed (advancedDataGuard) | fcald:1:1 physical drive 1:128 is failed | fcapd:1:128 physical drive 1:129 is ok | fcapd:1:129 physical drive 1:130 is failed | fcapd:1:130 physical drive 1:131 is ok | fcapd:1:131 physical drive 1:132 is failed | fcapd:1:132 physical drive 1:133 is ok | fcapd:1:133 physical drive 1:134 is ok | fcapd:1:134 physical drive 1:135 is ok | fcapd:1:135 physical drive 1:144 is ok | fcapd:1:144 physical drive 1:145 is ok | fcapd:1:145 physical drive 1:147 is unconfigured | fcapd:1:147 fcal host controller 0 in slot 1 is ok | fcahc:0 fcal host controller 1 in slot 1 is ok | fcahc:1 |
Angenommen, es soll das defekte Speichermodul und die drei ausgefallenen Platten (inklusive des logischen Laufwerks) ausgeblendet werden, so lautet das Argument für −−blacklist
d:0:5/fcapd:1:128,1:130,1:132/fcald:1:1
Alternativ kann der Option −−blacklist auch ein Dateiname übergeben werden, in deren erster Zeile diese Liste der auszublendenden Komponenten steht.
Wenn die vom System gelieferten Temperaturschwellwerte durch eigene ersetzt werden sollen, dann gibt man dies mit der Option −−customthresholds an.
nagios$ check_hpasm ... 1 cpu temperature is 45C (62 max) 2 cpu temperature is 56C (80 max) 3 ioBoard temperature is 38C (60 max) 4 cpu temperature is 59C (80 max) 5 powerSupply temperature is 31C (53 max) ... nagios$ check_hpasm --customthresholds 1:70/5:65 ... 1 cpu temperature is 45C (70 max) 2 cpu temperature is 56C (80 max) 3 ioBoard temperature is 38C (60 max) 4 cpu temperature is 59C (80 max) 5 powerSupply temperature is 31C (65 max) ... |
Mit der Option −−perfdata kann die Ausgabe von Performance Data eingeschaltet werden, falls dies nicht bereits bei der Installation als Default gewünscht wurde. (Sollten die Performancedaten zu lang werden, kann mit –perfdata=short eine Kurzform der Temperatur-Tags ausgegeben werden. Die Location wird dann weggelassen)
nagios$ check_hpasm OK - hardware working fine| fan_1=8%;0;0 fan_2=8%;0;0 fan_3=15%;0;0 fan_4=15%;0;0 fan_5=8%;0;0 fan_6=8%;0;0 fan_7=20%;0;0 fan_8=20%;0;0 'temp_1_processor_zone'=38;62;62 'temp_2_cpu#1'=37;73;73 'temp_3_i/o_zone'=49;68;68 'temp_4_cpu#2'=40;73;73 'temp_5_power_supply_bay'=36;44;44 nagios$ check_hpasm --perfdata short OK - hardware working fine| fan_1=8%;0;0 fan_2=8%;0;0 fan_3=15%;0;0 fan_4=15%;0;0 fan_5=8%;0;0 fan_6=8%;0;0 fan_7=20%;0;0 fan_8=20%;0;0 'temp_1'=38;62;62 'temp_2'=37;73;73 'temp_3'=49;68;68 'temp_4'=40;73;73 'temp_5'=36;44;44 |
Bei manchen Bios-Versionen werden die Speichermodule von hpasmcli nicht korrekt angezeigt. Der Befehl SHOW DIMM liefert dann nur eine Liste von Modulen mit Zustand n/a, was normalerweise als Warning gewertet wird. Mit der Option -i bzw. −−ignore-dimms kann man die Speicherprüfung auch ohne Blacklist überspringen und so die Warning vermeiden.
Sollte eine Warnung kommen, daß sämtliche Lüfter nicht redundant seien, dann sind vermutlich einzelne Lüfter statt Lüfterpaare verbaut worden. Mit −−ignore-fan-redundancy kann die Prüfung auf Redundanz abgeschaltet werden. (Siehe README).
Leider ist es nicht möglich, die Lüfterdrehzahlen (bzw. Prozent der maximalen Drehzahl) per SNMP zu bekommen. Es wird daher ein Ersatzwert von 50% angezeigt.
Weitere Beispiele für mögliche Fehlersituationen:
Defektes Speichermodul:
nagios$ check_hpasm CRITICAL - dimm module 2 @ cartridge 2 needs attention (dimm is degraded) nagios$ check_hpasm -v checking hpasmd process System :proliant dl580 g3 Serial No. :GB8632FB7V ROM version :P38 04/28/2006 checking cpus cpu 0 is ok cpu 1 is ok cpu 2 is ok cpu 3 is ok checking power supplies powersupply 1 is ok powersupply 2 is ok checking fans checking temperatures 1 cpu#1 temparature is 36 (80 max) 2 cpu#2 temparature is 34 (80 max) 3 cpu#3 temparature is 33 (80 max) 4 cpu#4 temparature is 37 (80 max) 5 i/o_zone temparature is 32 (60 max) 6 ambient temparature is 23 (40 max) 7 system_bd temparature is 34 (60 max) checking memory modules dimm 1@1 is ok dimm 2@1 is ok dimm 3@1 is ok dimm 4@1 is ok dimm 1@2 is ok dimm 2@2 is dimm is degraded dimm 3@2 is ok dimm 4@2 is ok CRITICAL - dimm module 2 @ cartridge 2 needs attention (dimm is degraded) |
Stromversorgungsmodul defekt:
nagios$ ./check_hpasm CRITICAL - powersuply #2 needs attention (failed), powersuply #1 is not redundant nagios$ ./check_hpasm -v checking hpasmd process System :proliant dl580 g4 Serial No. :GB8637M8TH ROM version :P59 09/08/2006 checking cpus cpu 0 is ok cpu 1 is ok cpu 2 is ok cpu 3 is ok checking power supplies powersupply 1 is ok powersupply 2 is failed checking fans checking temperatures 1 cpu#1 temparature is 42 (85 max) 2 cpu#2 temparature is 46 (85 max) 3 cpu#3 temparature is 44 (85 max) 4 cpu#4 temparature is 44 (85 max) 5 i/o_zone temparature is 39 (60 max) 6 ambient temparature is 27 (40 max) 7 system_bd temparature is 41 (60 max) checking memory modules dimm 1@1 is ok dimm 2@1 is ok dimm 3@1 is ok dimm 4@1 is ok dimm 1@2 is ok dimm 2@2 is ok dimm 3@2 is ok dimm 4@2 is ok dimm 1@3 is ok dimm 2@3 is ok dimm 3@3 is ok dimm 4@3 is ok dimm 1@4 is ok dimm 2@4 is ok CRITICAL - powersuply #2 needs attention (failed), powersuply #1 is not redundant |
Stromversorgungsmodul wurde gezogen:
nagios$ ./check_hpasm CRITICAL - powersuply #2 is missing, powersuply #1 is not redundant nagios$ ./check_hpasm -v checking hpasmd process System :proliant dl580 g4 Serial No. :GB8637M8TH ROM version :P59 09/08/2006 checking cpus cpu 0 is ok cpu 1 is ok cpu 2 is ok cpu 3 is ok checking power supplies powersupply 1 is ok powersupply 2 is n/a checking fans checking temperatures 1 cpu#1 temparature is 42 (85 max) 2 cpu#2 temparature is 46 (85 max) 3 cpu#3 temparature is 44 (85 max) 4 cpu#4 temparature is 44 (85 max) 5 i/o_zone temparature is 39 (60 max) 6 ambient temparature is 27 (40 max) 7 system_bd temparature is 41 (60 max) checking memory modules dimm 1@1 is ok dimm 2@1 is ok dimm 3@1 is ok dimm 4@1 is ok dimm 1@2 is ok dimm 2@2 is ok dimm 3@2 is ok dimm 4@2 is ok dimm 1@3 is ok dimm 2@3 is ok dimm 3@3 is ok dimm 4@3 is ok dimm 1@4 is ok dimm 2@4 is ok CRITICAL - powersuply #2 is missing, powersuply #1 is not redundant |
Hpasm Daemon läuft nicht:
nagios$ check_hpasm
CRITICAL - hpasmd needs to be started |
Hpasm Paket ist nicht installiert:
OK - hardware working fine, at least i hope so because hpasm is not installed |
Bitte rufen sie check_hpasm auf möglichst vielen Plattformen mit der -v Option auf. Möglicherweise haben sie ein selteneres Proliant-Modell, dessen Komponenten nicht vollständig erkannt werden. Sie erhalten dann einen Hinweis, wie sie den Autor darüber informieren können.
Folgende Zeile taucht dabei häufig auf, kann aber ignoriert werden:
#0 SYSTEM_BD - - |
Ich bin immer an Testdaten interessiert. Wenn sie mir einen Gefallen tun wollen, schicken sie mir die Ausgabe von
snmpwalk ... <ip-adresse> 1.3.6.1.4.1.232 |
oder, falls sie die lokale Variante einsetzen, die Ausgabe des folgenden Scripts:
hpasmcli=$(which hpasmcli)
hpacucli=$(which hpacucli)
for i in server powersupply fans temp dimm iml
do
$hpasmcli -s "show $i" | while read line
do
printf '%s %s\n' $i "$line"
done
done
if [ -x "$hpacucli" ]; then
for i in config status
do
$hpacucli ctrl all show $i | while read line
do
printf '%s %s\n' $i "$line"
done
done
fi |
check_hpasm-4.6.3.2.tar.gz [1]
- fix the problem with binrry zero EventUpdateTime
- Proliant Gen8 should work now
- skip pagination in long "show iml" lists
- make bulk requests if possible
- support older <=7 versions of hpacucli
- add another error log: Uncorrectable Memory Error
- raise the default timeout from 15 to 60 seconds
- remove watt percent for blade center power supply
- make the snmp oid collection phase shorter for blade center
- correctly identify dl388g7 (Thanks lilei8)
- add checks for nic teaming (experimental!!, must be enabled with –eval-nics)
- fix a bug with invalid date/time from iml
- fix a bug in blade enclosure manager verbose output
- add msa2xxx storage sensors
Gerhard Laußer
Check_hpasm wird unter der GNU General Public License zur Verfügung gestellt. GPL [12]
Gerhard Laußer (gerhard.lausser@consol.de [13]) beantwortet gerne Fragen zu diesem Plugin.
Article printed from ConSol* Labs: http://labs.consol.de
URL to article: http://labs.consol.de/lang/de/nagios/check_hpasm
URLs in this post:
[1] check_hpasm-4.6.3.2.tar.gz: http://labs.consol.de/download/shinken-nagios-plugins/check_hpasm-4.6.3.2.tar.gz
[2] hpasm RPM-Pakete: http://labs.consol.deftp://ftp.compaq.com/pub/products/servers/supportsoftware/linux
[3] Win2003 System Management Driver: http://h20000.www2.hp.com/bizsupport/TechSupport/SoftwareDescription.jsp?swItem=MTX-3bbefa4d3f0547c3b81acbddb8&lang=en&cc=us&mode=3&
[4] Win2003 Insight Management Agents: http://h20000.www2.hp.com/bizsupport/TechSupport/SoftwareDescription.jsp?lang=en&cc=US&swItem=MTX-ed4b332887f945a383fe2b06e7
[5] Managing Proliant Servers with Linux: http://h20000.www2.hp.com/bc/docs/support/SupportManual/c00223285/c00223285.pdf
[6] HPASM für Debian: http://gentoo-wiki.com/HOWTO_Use_Hpasm
[7] Nagios Homepage: http://www.nagios.org/
[8] Nagios Plugins Exchange: http://exchange.nagios.org/
[9] Deutsches Nagios Portal: http://www.nagios-portal.de/
[10] Deutsches Nagios Wiki: http://www.nagios-wiki.de/
[11] EBuild for Gentoo: http://bugs.gentoo.org/show_bug.cgi?id=202867
[12] GPL: http://www.gnu.de/documents/gpl.de.html
[13] gerhard.lausser@consol.de: mailto:gerhard.lausser@consol.de
Click here to print.
Copyright © 2010 ConSol* Labs. All rights reserved.