Supervision HPE Proliant Gen10 (SNMP/RestAPI)

Hello, nous allons voir dans cet article la supervision des serveurs HPE Proliant Gen10 (DLXXX) via SNMP mais aussi via RestAPI avec Centreon et les plugins packs.

Ce qu’il vous faut :

  • Une serveur HPE Proliant Gen10
  • Interface de maintenance iLO pour configurer SNMP
  • Votre plate-forme de supervision Centreon

Voir les autres articles sur la supervision :

Supervision All In One :

Supervision HPE Proliant Gen10 via SNMP

Nous allons commencer par la supervision en ligne de commande. N’oubliez de configurer SNMP via l’interface iLO, menu > Management

Configuration SNMP HPE Proliant Gen10

Check-HPE-cpu

Supervision du CPU :

[root@pixelabs plugins]# perl centreon_plugins.pl --plugin=hardware::server::hp::proliant::snmp::plugin --mode=hardware --hostname=hpe-proliant --snmp-community=hpe --snmp-version=2 --component=cpu --verbose
OK: All 1 components are ok [1/1 cpus]. | 'count_cpu'=1;;;;
Product Name: ProLiant DL325 Gen10 Plus, Serial: [...], Rom Version: [...]
Checking cpu
cpu '0' [slot: 0, unit: 0, name: AMD EPYC 7542 32-Core Processor, socket: 1] status is ok.
[root@pixelabs plugins]#

Check-HPE-psu

Supervision de l’alimentation :

[root@pixelabs plugins]# perl centreon_plugins.pl --plugin=hardware::server::hp::proliant::snmp::plugin --mode=hardware --hostname=hpe-proliant --snmp-community=hpe --snmp-version=2 --component=psu --verbose
OK: All 2 components are ok [2/2 power supplies]. | 'psu_power_0.1'=104W;;800;; 'psu_voltage_0.1'=230V;;;; 'psu_power_0.2'=105W;;800;; 'psu_voltage_0.2'=229V;;;; 'count_psu'=2;;;;
Product Name: ProLiant DL325 Gen10 Plus, Serial: [...], Rom Version: [...]
Checking power supplies
powersupply '0.1' status is ok [redundance: 3, redundant partner: 0] (status noError).
powersupply '0.2' status is ok [redundance: 3, redundant partner: 0] (status noError).
[root@pixelabs plugins]#

Check-HPE-fan

Supervision des ventilateurs :

[root@pixelabs plugins]# perl centreon_plugins.pl --plugin=hardware::server::hp::proliant::snmp::plugin --mode=hardware --hostname=hpe-proliant --snmp-community=hpe --snmp-version=2 --component=fan --verbose
UNKNOWN: fan '0.2' status is other | 'count_fan'=8;;;;
Product Name: ProLiant DL325 Gen10 Plus, Serial: [...], Rom Version: [...]
Checking fans
fan '0.1' status is ok, speed is normal [location: system, redundance: redundant, redundant partner: 1].
fan '0.2' status is other, speed is other [location: system, redundance: not redundant, redundant partner: 3].
fan '0.3' status is ok, speed is normal [location: system, redundance: redundant, redundant partner: 4].
fan '0.4' status is ok, speed is normal [location: system, redundance: redundant, redundant partner: 5].
fan '0.5' status is ok, speed is normal [location: system, redundance: redundant, redundant partner: 6].
fan '0.6' status is ok, speed is normal [location: system, redundance: redundant, redundant partner: 7].
fan '0.7' status is ok, speed is normal [location: system, redundance: redundant, redundant partner: 8].
fan '0.8' status is ok, speed is normal [location: system, redundance: redundant, redundant partner: 1].
[root@pixelabs plugins]#

Check-HPE-temp

Supervision de la température :

[root@pixelabs plugins]# perl centreon_plugins.pl --plugin=hardware::server::hp::proliant::snmp::plugin --mode=hardware --hostname=hpe-proliant --snmp-community=hpe --snmp-version=2 --component=temperature --verbose
OK: All 32 components are ok [32/32 temperatures]. | [...]
Product Name: ProLiant DL325 Gen10 Plus, Serial: [...], Rom Version: [...]
Checking temperatures
'0.1' ambient temperature is 18C (42 max) (status is ok).
'0.2' cpu temperature is 40C (75 max) (status is ok).
'0.3' memory temperature is 49C (90 max) (status is ok).
'0.4' memory temperature is 46C (90 max) (status is ok).
'0.5' system temperature is 35C (60 max) (status is ok).
'0.7' system temperature is 56C (110 max) (status is ok).
'0.8' system temperature is 55C (110 max) (status is ok).
'0.9' system temperature is 56C (110 max) (status is ok).
'0.10' system temperature is 31C (60 max) (status is ok).
'0.11' system temperature is 74C (110 max) (status is ok).
'0.12' system temperature is 48C (80 max) (status is ok).
'0.13' system temperature is 27C (70 max) (status is ok).
'0.14' system temperature is 34C (65 max) (status is ok).
'0.15' ioBoard temperature is 68C (100 max) (status is ok).
'0.16' ioBoard temperature is 77C (100 max) (status is ok).
'0.17' ioBoard temperature is 83C (100 max) (status is ok).
'0.18' ioBoard temperature is 36C (70 max) (status is ok).
'0.19' ioBoard temperature is 43C (70 max) (status is ok).
'0.20' system temperature is 60C (100 max) (status is ok).
'0.21' system temperature is 27C (70 max) (status is ok).
'0.22' ioBoard temperature is 83C (92 max) (status is ok).
'0.23' system temperature is 50C (70 max) (status is ok).
'0.24' system temperature is 52C (70 max) (status is ok).
'0.25' system temperature is 40C (100 max) (status is ok).
'0.26' system temperature is 45C (75 max) (status is ok).
'0.27' powerSupply temperature is 30C (0 max) (status is ok).
'0.28' powerSupply temperature is 35C (0 max) (status is ok).
'0.29' powerSupply temperature is 40C (0 max) (status is ok).
'0.30' powerSupply temperature is 40C (0 max) (status is ok).
'0.31' powerSupply temperature is 43C (75 max) (status is ok).
'0.33' system temperature is 44C (115 max) (status is ok).
'0.34' ioBoard temperature is 41C (70 max) (status is ok).
[root@pixelabs plugins]#

Check-HPE-lnic

Supervision des NICs logique :

[root@pixelabs plugins]# perl centreon_plugins.pl --plugin=hardware::server::hp::proliant::snmp::plugin --mode=hardware --hostname=hd-proliant --snmp-community=hpe --snmp-version=2 --component=lnic --verbose
OK: All 4 components are ok [4/4 logical nics]. | 'count_lnic'=4;;;;
Product Name: ProLiant DL325 Gen10 Plus, Serial: [...], Rom Version: [...]
Checking logical nics
logical nic '1' [adapter count: 1, description: Logical Interface for vmnic0, status: ok] condition is ok.
logical nic '2' [adapter count: 1, description: Logical Interface for vmnic1, status: ok] condition is ok.
logical nic '3' [adapter count: 1, description: Logical Interface for vmnic2, status: ok] condition is ok.
logical nic '4' [adapter count: 1, description: Logical Interface for vmnic3, status: ok] condition is ok.
[root@pixelabs plugins]#

Check-HPE-pnic

Supervision des NICs physique :

[root@pixelabs plugins]# perl centreon_plugins.pl --plugin=hardware::server::hp::proliant::snmp::plugin --mode=hardware --hostname=hpe-proliant --snmp-community=hpe --snmp-version=2 --component=pnic --verbose
OK: All 4 components are ok [4/4 physical nics]. | 'count_pnic'=4;;;;
Product Name: ProLiant DL325 Gen10 Plus, Serial: [...], Rom Version: [...]
Checking physical nics
physical nic '1' [duplex: full, role: notApplicable, state: ok, status: ok] condition is ok.
physical nic '2' [duplex: full, role: notApplicable, state: ok, status: ok] condition is ok.
physical nic '3' [duplex: full, role: notApplicable, state: ok, status: ok] condition is ok.
physical nic '4' [duplex: full, role: notApplicable, state: ok, status: ok] condition is ok.
[root@pixelabs plugins]#

Check-HPE-lnic+pnic

OneShot pour les deux services NICs Physique/Logique ci-dessus :

--component=network

[root@pixelabs plugins]# perl centreon_plugins.pl --plugin=hardware::server::hp::proliant::snmp::plugin --mode=hardware --hostname=hp-proliant --snmp-community=hpe --snmp-version=2 --component=network --verbose
OK: All 8 components are ok [4/4 logical nics, 4/4 physical nics]. | 'count_lnic'=4;;;; 'count_pnic'=4;;;;
Product Name: ProLiant DL325 Gen10 Plus, Serial: [...], Rom Version: [...]
Checking physical nics
physical nic '1' [duplex: full, role: notApplicable, state: ok, status: ok] condition is ok.
physical nic '2' [duplex: full, role: notApplicable, state: ok, status: ok] condition is ok.
physical nic '3' [duplex: full, role: notApplicable, state: ok, status: ok] condition is ok.
physical nic '4' [duplex: full, role: notApplicable, state: ok, status: ok] condition is ok.
Checking logical nics
logical nic '1' [adapter count: 1, description: Logical Interface for vmnic0, status: ok] condition is ok.
logical nic '2' [adapter count: 1, description: Logical Interface for vmnic1, status: ok] condition is ok.
logical nic '3' [adapter count: 1, description: Logical Interface for vmnic2, status: ok] condition is ok.
logical nic '4' [adapter count: 1, description: Logical Interface for vmnic3, status: ok] condition is ok.
[root@pixelabs plugins]#

Check-HPE-storage

Un retour avec le mot “Storage”

[root@pixelabs plugins]# perl centreon_plugins.pl --plugin=hardware::server::hp::proliant::snmp::plugin --mode=hardware --hostname=hpe-proliant --snmp-community=hpe --snmp-version=2 --component=storage --verbose --snmp-force-getnext
[...]
Product Name: ProLiant DL325 Gen10 Plus, Serial: [...], Rom Version: [...]
Checking ide controllers
Checking ide logical drives
Checking ide physical drives
Checking sas controllers
Checking sas logical drives
Checking sas physical drives
Checking scsi controllers
Checking scsi logical drives
Checking scsi physical drives
Checking fca host controller
fca host controller '1' [slot: 2, model: unknown, status: ok] condition is ok.
fca host controller '2' [slot: 2, model: unknown, status: other] condition is other.
fca host controller '3' [slot: 3, model: unknown, status: other] condition is other.
fca host controller '4' [slot: 3, model: unknown, status: ok] condition is ok.
Checking fca external controller
Checking fca external accelerator boards
Checking fca logical drives
Checking fca physical drives
Checking da controller
da controller '12' [slot: 12, model: unknown] status is ok.
Checking da accelerator boards
da controller accelerator '12' [status: invalid, battery status: ok] condition is other.
Checking da logical drives
da logical drive '12.1' [fault tolerance: mirroring, condition: ok] status is ok.
Checking da physical drives
da physical drive '12.0' [status: ok] condition is ok.
da physical drive '12.1' [status: ok] condition is ok.
[root@pixelabs plugins]#

On peut ignorer certains composant pour éviter le statut UNKNOWN. Ici, les 4 FCA Controller et le da Controller

--filter='fca,1' --filter='fca,2' --filter='fca,3' --filter='fca,4' --filter='da,12'

Supervision HPE Proliant Gen10 via RestAPI

On refait la même chose via le plugin RestAPI.

Rest API nécessite un compte et une connexion sécurisé. Il est possible d’ignorer le certificat SSL si votre interface iLO n’est pas en HTTPS.

Check-HPE-RestAPI-chassis

Supervision du chassis via RestAPI :

[root@pixelabs plugins]# perl centreon_plugins.pl --plugin=hardware::server::hp::ilo::restapi::plugin --mode=hardware --hostname=hpe-proliant --api-username=sysadmin --api-password='Pa$$W@rd!' --ssl-opt="SSL_verify_mode => SSL_VERIFY_NONE" --component=chassis --verbose
OK: All 1 components are ok [1/1 chassis]. | [...]
checking chassis
chassis '1' status is 'OK' [instance: 1, state: Enabled]
[root@pixelabs plugins]#

Check-HPE-RestAPI-device

Supervision des device via RestAPI

[root@pixelabs plugins]# perl centreon_plugins.pl --plugin=hardware::server::hp::ilo::restapi::plugin --mode=hardware --hostname=hpe-proliant --api-username=sysadmin --api-password='Pa$$W@rd!' --ssl-opt="SSL_verify_mode => SSL_VERIFY_NONE" --component=device --verbose
OK: All 7 components are ok [7/7 devices]. | [...]
checking devices
device 'chassis:1/Marvell FastLinQ 41000 Series - 2P 10GbE 10GBASE-T QL41132HLRJ-HC MD2 Adapter - NIC' status is 'OK' [instance: 1.1, state: Enabled]
device 'chassis:1/HPE SN1100Q 16Gb 2P FC HBA' status is 'OK' [instance: 1.2, state: Enabled]
device 'chassis:1/HPE SN1100Q 16Gb 2P FC HBA' status is 'OK' [instance: 1.3, state: Enabled]
device 'chassis:1/HPE Smart Array P408i-a SR Gen10' status is 'OK' [instance: 1.4, state: Enabled]
device 'chassis:1/Marvell 2P 10GbE 10GBASE-T QL41132HQRJ-HC OCP3 Adapter' status is 'OK' [instance: 1.5, state: Enabled]
device 'chassis:1/HPE Smart Storage Battery' status is 'OK' [instance: 1.6, state: Enabled]
device 'chassis:1/Embedded Video Controller' status is 'OK' [instance: 1.7, state: Enabled]
[root@pixelabs plugins]#

Check-HPE-RestAPI-fan

Supervision des ventilateurs via RestAPI :

[root@pixelabs plugins]# perl centreon_plugins.pl --plugin=hardware::server::hp::ilo::restapi::plugin --mode=hardware --hostname=hpe-proliant --api-username=sysadmin --api-password='Pa$$W@rd!' --ssl-opt="SSL_verify_mode => SSL_VERIFY_NONE" --component=fan --verbose
OK: All 8 components are ok [8/8 fans]. | [...]
checking fans
fan 'chassis:1/Fan 1' status is 'OK' [instance: 1.0, state: Enabled, speed: 17 Percent]
fan 'chassis:1/Fan 2' status is 'n/a' [instance: 1.1, state: Absent, speed: 0 Percent]
fan 'chassis:1/Fan 3' status is 'OK' [instance: 1.2, state: Enabled, speed: 17 Percent]
fan 'chassis:1/Fan 4' status is 'OK' [instance: 1.3, state: Enabled, speed: 17 Percent]
fan 'chassis:1/Fan 5' status is 'OK' [instance: 1.4, state: Enabled, speed: 17 Percent]
fan 'chassis:1/Fan 6' status is 'OK' [instance: 1.5, state: Enabled, speed: 17 Percent]
fan 'chassis:1/Fan 7' status is 'OK' [instance: 1.6, state: Enabled, speed: 17 Percent]
fan 'chassis:1/Fan 8' status is 'OK' [instance: 1.7, state: Enabled, speed: 17 Percent]
[root@pixelabs plugins]#

Check-HPE-RestAPI-psu

Supervision des alimentations via RestAPI :

[root@pixelabs plugins]# perl centreon_plugins.pl --plugin=hardware::server::hp::ilo::restapi::plugin --mode=hardware --hostname=hpe-proliant --api-username=sysadmin --api-password='Pa$$W@rd!' --ssl-opt="SSL_verify_mode => SSL_VERIFY_NONE" --component=psu --verbose
OK: All 2 components are ok [2/2 psu]. | [...]
checking power supplies
power supply 'chassis:1/psu:0' status is 'OK' [instance: 1.0, state: Enabled, value: 111]
power supply 'chassis:1/psu:1' status is 'OK' [instance: 1.1, state: Enabled, value: 111]
[root@pixelabs plugins]#

Check-HPE-RestAPI-temp

Supervision de la température :

[root@pixelabs plugins]# perl centreon_plugins.pl --plugin=hardware::server::hp::ilo::restapi::plugin --mode=hardware --hostname=hpe-proliant --api-username=sysadmin --api-password='Pa$$W@rd!' --ssl-opt="SSL_verify_mode => SSL_VERIFY_NONE" --component=temperature --verbose
OK: All 34 components are ok [34/34 temperatures]. | [...]
checking temperatures
temperature 'chassis:1/01-Inlet Ambient' status is 'OK' [instance: 1.0, state: Enabled, value: 18]
temperature 'chassis:1/02-CPU' status is 'OK' [instance: 1.1, state: Enabled, value: 40]
temperature 'chassis:1/03-P DIMM 1-8' status is 'OK' [instance: 1.2, state: Enabled, value: 48]
temperature 'chassis:1/04-P DIMM 9-16' status is 'OK' [instance: 1.3, state: Enabled, value: 45]
temperature 'chassis:1/05-HD Max' status is 'OK' [instance: 1.4, state: Enabled, value: 35]
temperature 'chassis:1/06-Exp Bay Drive' status is 'n/a' [instance: 1.5, state: Absent, value: 0]
temperature 'chassis:1/07-VR P' status is 'OK' [instance: 1.6, state: Enabled, value: 56]
temperature 'chassis:1/08-VR P Mem 1' status is 'OK' [instance: 1.7, state: Enabled, value: 54]
temperature 'chassis:1/09-VR P Mem 2' status is 'OK' [instance: 1.8, state: Enabled, value: 56]
temperature 'chassis:1/10-Stor Batt' status is 'OK' [instance: 1.9, state: Enabled, value: 30]
temperature 'chassis:1/11-BMC' status is 'OK' [instance: 1.10, state: Enabled, value: 73]
temperature 'chassis:1/12-BMC Zone' status is 'OK' [instance: 1.11, state: Enabled, value: 48]
temperature 'chassis:1/13-System Board' status is 'OK' [instance: 1.12, state: Enabled, value: 27]
temperature 'chassis:1/14-Board Inlet' status is 'OK' [instance: 1.13, state: Enabled, value: 34]
temperature 'chassis:1/15-PCI 1' status is 'OK' [instance: 1.14, state: Enabled, value: 67]
temperature 'chassis:1/16-PCI 2' status is 'OK' [instance: 1.15, state: Enabled, value: 76]
temperature 'chassis:1/17-PCI 3' status is 'OK' [instance: 1.16, state: Enabled, value: 83]
temperature 'chassis:1/18-PCI 1 Zone' status is 'OK' [instance: 1.17, state: Enabled, value: 36]
temperature 'chassis:1/20-PCI 3 Zone' status is 'OK' [instance: 1.18, state: Enabled, value: 43]
temperature 'chassis:1/21-HD Controller' status is 'OK' [instance: 1.19, state: Enabled, value: 59]
temperature 'chassis:1/22-HD Cntlr Zone' status is 'OK' [instance: 1.20, state: Enabled, value: 27]
temperature 'chassis:1/23-LOM Card' status is 'OK' [instance: 1.21, state: Enabled, value: 83]
temperature 'chassis:1/24-Sys Exhaust' status is 'OK' [instance: 1.22, state: Enabled, value: 49]
temperature 'chassis:1/25-Chipset Zone' status is 'OK' [instance: 1.23, state: Enabled, value: 51]
temperature 'chassis:1/26-I/O Zone' status is 'OK' [instance: 1.24, state: Enabled, value: 39]
temperature 'chassis:1/27-Battery Zone' status is 'OK' [instance: 1.25, state: Enabled, value: 45]
temperature 'chassis:1/28-P/S 1 Inlet' status is 'OK' [instance: 1.26, state: Enabled, value: 30]
temperature 'chassis:1/29-P/S 2 Inlet' status is 'OK' [instance: 1.27, state: Enabled, value: 35]
temperature 'chassis:1/30-P/S 1' status is 'OK' [instance: 1.28, state: Enabled, value: 40]
temperature 'chassis:1/31-P/S 2' status is 'OK' [instance: 1.29, state: Enabled, value: 40]
temperature 'chassis:1/32-P/S Zone' status is 'OK' [instance: 1.30, state: Enabled, value: 43]
temperature 'chassis:1/34-AHCI HD Max' status is 'n/a' [instance: 1.31, state: Absent, value: 0]
temperature 'chassis:1/35-VR PMem Zone' status is 'OK' [instance: 1.32, state: Enabled, value: 44]
temperature 'chassis:1/36-PCI Zone' status is 'OK' [instance: 1.33, state: Enabled, value: 40]
[root@pixelabs plugins]#

Remarque : vous pouvez tout superviser en une seule fois, il suffit de mettre --component='.*'

Commande de supervision Centreon Web

Je vous donne les commandes RestAPI pour Centreon Web et à vous de réaliser le reste (Création d’host, service, les commandes de supervision ci-dessus).

Les macros nécessaires pour la supervision SNMP :

  • $_SERVICEPLUGIN$
  • $_SERVICEMODE$
  • $_SERVICEHOST$
  • $_HOSTSNMPCOMMUNITY$
  • $_HOSTSNMPVERSION$
  • $_SERVICEOPTION$

Les macros nécessaires pour la supervision RestAPI :

  • $_SERVICEPLUGIN$
  • $_SERVICEMODE$
  • $_SERVICEHOST$
  • $_SERVICEUSERNAME$
  • $_SERVICEPASSWORD$
  • $_SERVICESSL$
  • $_SERVICECOMPONENT$
  • $_SERVICEOPTION$

Attention : pour le hostname, si vous ne supervisez pas les interfaces de maintenance iLO en tant qu’hôte, vous devez utiliser la macro SERVICEHOST afin de renseigner l’adresse IP de l’interface iLO. Si vous superviser les interfaces iLO en tant qu’hôte, utiliser la macro par défaut qui permet d’utiliser l’adresse IP de votre hôte  –hostname=$HOSTADDRESS$

Commande unique via SNMP

  • Nom de commande : Check-HPE-SNMP
  • Type de commande : Vérifier
  • Ligne de commande :
$USER2$/centreon_plugins.pl --plugin=$_SERVICEPLUGIN$ --mode=$_SERVICEMODE$ --hostname=$_SERVICEHOST$ --snmp-community=$_HOSTSNMPCOMMUNITY$ --snmp-version=$_HOSTSNMPVERSION$ --component=$_SERVICECOMPONENT$ $_SERVICEOPTION$

Commande unique via RestAPI

  • Nom de commande : Check-HPE-RestAPI
  • Type de commande : Vérifier
  • Ligne de commande :
$USER2$/centreon_plugins.pl --plugin=$_SERVICEPLUGIN$ --mode=$_SERVICEMODE$ --hostname=$_SERVICEHOST$ --api-username=$_SERVICEUSERNAME$ --api-password=$_SERVICEPASSWORD$ --ssl-opt=$_SERVICESSL$ --component=$_SERVICECOMPONENT$ $_SERVICEOPTION$

HPE Proliant Monitoring Centreon

A vous maintenant de créer les hôtes et les services pour vos serveurs HPE Proliant.

Exemple & Résultat

Voici un exemple. C’est la même chose pour tout le reste, c’est l’avantage d’avoir une commande unique.

Supervision Chassis HPE Proliant Gen10

Exporter la configuration en relançant le collecteur.

Supervision HPE Proliant Centreon

Bonne journée à tous et à bientôt.

 
Besoin d’aide ? des questions ?

Venez sur le forum
logo Forum Pixelabs
***********
La rédaction de cette documentation demande beaucoup de temps, de motivation, mais surtout beaucoup de café 🙂

Vous aimez pixelabs ?

Offrez moi un petit café en cliquant sur la tasse ci-dessous.
pixelans_donation
Merci !