Outils pour utilisateurs

Outils du site


config_hp_proliant

Installation des outils HP pour debian

Ajoutez le dépot suivant pour Debian wheezy :

deb http://downloads.linux.hpe.com/SDR/repo/mcp/ wheezy/current non-free

Ajoutez le dépot suivant pour Debian jessie :

deb http://downloads.linux.hpe.com/SDR/repo/mcp/ jessie/current non-free

Ajoutez le dépot suivant pour Debian stretch :

deb http://downloads.linux.hpe.com/SDR/repo/mcp/ stretch/current non-free

Ajoutez le dépot suivant pour Debian buster :

deb http://downloads.linux.hpe.com/SDR/repo/mcp buster/current non-free

Ajoutez les clés (d'autres clés sont susceptibles d’apparaître sur http://downloads.linux.hpe.com/keys.html)

curl https://downloads.linux.hpe.com/SDR/hpPublicKey2048.pub | apt-key add -
curl https://downloads.linux.hpe.com/SDR/hpPublicKey2048_key1.pub | apt-key add -
curl https://downloads.linux.hpe.com/SDR/hpePublicKey2048_key1.pub | apt-key add -

Pour debian wheezy :

aptitude update
aptitude install hp-health hpacucli

Pour debian jessie :

aptitude update
aptitude install hp-health hpssacli

Pour debian stretch :

aptitude update
aptitude install hp-health ssacli

Pour debian buster :

apt update
apt install hp-health hponcfg hp-ams hp-snmp-agents hp-smh-templates ssacli ssaducli ssa -y

Sous debian wheezy :

hpacucli ctrl all show config
hpacucli ctrl all show config detail

Sous debian jessie :

hpssacli ctrl all show config
hpssacli ctrl all show config detail

Sous debian stretch :

ssacli ctrl all show config
ssacli ctrl all show config detail

Pour générer un fichier de rapport (peut être demandé par HP) : hpssacli ctrl all diag file=/tmp/ADUReport.zip 2 smart des disques

Notez qu'il est préférable d'avoir une version récente de smartmontools, installez par exemple celle des backports debian

modprobe sg
smartctl -a -d cciss,0 /dev/sg0
smartctl -a -d cciss,1 /dev/sg1

Installer les outils HP

apt install hponcfg hp-snmp-agents hpsmh

Descriptif des paquets :

  • hponcfg : Gestion de iLO.
  • hp-snmp-agents : Agents SNMP HP pour le monitoring de serveurs HP PROLIANT.
  • hp-health : Gestion du matériel hardware depuis le système. (Installé à l'étape précédente)
  • hpsmh : Interface web pour accès distant à la gestion du serveur (version obsolète dans les dépôts)

Config SNMP pour HP Proliant

Le démon snmpd est un grand bavard dans sa configuration par défaut sous Debian, et on se retrouve rapidement avec un syslog envahi de messages à chaque connexion d’un client snmp ! Résultat : Pollution de la syslog du type snmpd[13322]: Connection from UDP: [127.0.0.1]:60516→[127.0.0.1]:161 Pour clouer le bec à l’insolent, il faut aller modifier les options de démarrage ExecStart du démon dans /lib/systemd/system/snmpd.service :

Afin de nous guider =⇒ Info du man sur la conf de SNMPD :

The  mechanism  and destination to use for logging of warning and error messages can be controlled by passing  various  parameters  to  the  -L flag.
-Le    Log messages to the standard error stream.
-Lf FILE
Log messages to the specified file.
 
-Lo    Log messages to the standard output stream.
 
-Ls FACILITY
Log  messages  via syslog, using the specified facility ('d' for LOG_DAEMON, 'u' for LOG_USER, or '0'-'7' for LOG_LOCAL0  through LOG_LOCAL7).
 
There  are  also  "upper case" versions of each of these options, which allow the corresponding logging mechanism to be restricted  to  certain priorities of message.  Using standard error logging as an example:
 
-LE pri
will log messages of priority 'pri' and above to standard error.
 
-LE p1-p2
will log messages with priority between 'p1'  and  'p2'  (inclusive) to standard error.
 
For  -LF  and  -LS  the priority specification comes before the file or facility token.  The priorities recognised are:  
 
0 or !  for LOG_EMERG,
1 or a for LOG_ALERT,
2 or c for LOG_CRIT,
3 or e for LOG_ERR,
4 or w for LOG_WARNING,
5 or n for LOG_NOTICE,
6 or i for LOG_INFO, and
7 or d for LOG_DEBUG.
 
Normal output is (or will be!) logged at a priority level of LOG_NOTICE

L’option qui nous intéresse est -Ls et 4d qui permet de n’écrire dans syslog qu’à partir du niveau warning. Un petit redémarrage du service et le tour est joué.

A noter que la syntaxe semble différer selon les distributions, dans notre cas Debian 9, -LS4d -Lf sans les espaces entre les arguments, pour obtenir la prise en compte.

Que l'on peut traduire par :

  • -LS : ecriture dans la syslog
  • 4d : quand le daemon snmpd perçoit des alertes à partir de WARNING
  • -Lf : toutes les autres alertes.

Modification du service snmpd :

# vi /lib/systemd/system/snmpd.service
ExecStart=/usr/sbin/snmpd -LS4d -Lf /dev/null -u Debian-snmp -g Debian-snmp -I -smux,mteTrigger,mteTriggerConf -f
# systemctl cat snmpd
==> Vérifier que la valeur est prise en compte !
# systemctl daemon-reload
# systemctl restart snmpd.service

Vérifier qu’il n’y a plus ces alertes dans la syslog :

snmpd[13322]: Connection from UDP: [127.0.0.1]:60516->[127.0.0.1]:161
config_hp_proliant.txt · Dernière modification : de 127.0.0.1