Skip to main content
Solved

Manipulation des données récupérées via snmp

  • 22 July 2024
  • 2 replies
  • 28 views

Bonjour

Je récupère depuis mon équipement via le modèle de service app-protocol-snmp-numeric-value-custom différentes valeurs :

Ces valeurs sont 8, 9, 10 ou 11.

En fonction de chacune de ces valeurs, je souhaite afficher autre chose que la valeur récupérée.

Ex: si 8 afficher “Bonjour”, si 9 afficher “45000”, etc.

Je ne sais pas comment m’y prendre et où ajouter ces conditions. Extraoptions ? Macros ? Commandes ?

Pouvez vous m’aiguiller ?

Merci

2 replies

Userlevel 4
Badge +12

Hi @VALYN,

The “numeric value” template is designed for metrics. If the value you collect are actually linked to status messages, you should use the “string value” template and have a look here. about how to use the --map-values option.

According to what you said, it would be --map-values=’8=>Bonjour,9=>45000’

And the right place for this option would be the EXTRAOPTIONS macro.

Badge +1

Hi,

Thank you very much !!….

This is exactly what I was looking for and it works perfectly
I was looking in Numeric-value options instead of String-value…

Thanks again

Reply