Input.snmp > associate hostname and @ip?

#1

Hello,

I collect data via snmp on several machines
in the input I inform the @ ip

On the other hand for more ease, I wish under grafana recover the associated hostname

Is it possible ?
If so how, an example?

[[inputs.snmp]]
agents = [“10.xxx.xxx.xxx”]
version = 3
auth_protocol = “sha”
auth_password = “xxxxxxx”
sec_level = “authPriv”
priv_protocol = “AES”
priv_password = “xxxxxxxxx”
sec_name = “xxxxxxxx”
max_repetitions = 10
timeout = “250s”
retries = 3

[[inputs.snmp.table]]

measurement Famille Announcements

name = “Announcements”

[[inputs.snmp.table.field]]
name = “cardstatMaxAnnouncements.1”
oid = “1.3.6.1.4.1.7569.1.2.1.28.1.18”

[[inputs.snmp.table]]

measurement Famille Conference

name = “Conference”

[[inputs.snmp.table.field]]
name = “cardstatMaxConferences”
oid = “1.3.6.1.4.1.7569.1.2.1.28.1.19”

thank you very much

#2

I believe you can use the inherit_tags configuration parameter to add the hostname to your SNMP measurements, as described in the SNMP plugin documentation.

The example provided appears to demonstrate this.

#3

I will try this track. Thanks