I'm trying to extract the MAC address out of what is returned by SNMP
exporter. The Regex I am using seems to work in general when I used an
online Regex tester but for some reason it's not working in SNMP exporter.
SNMPExporter config:
- name: apSysStatBssid
oid: 1.3.6.1.4.1.11.2.14.11.6.4.5.1.1.1.1.31.3
type: PhysAddress48
help: MAC address of the AP that the HPE501 is Associated to. -
1.3.6.1.4.1.11.2.14.11.6.4.5.1.1.1.1.31.3
regex_extracts:
Test:
- regex: '([\w]{2}:[\w]{2}:[\w]{2}:[\w]{2}:[\w]{2}:[\w]{2})'
value: '$1'
This is what I typically get data wise without the regex config:
# HELP apSysStatBssid BSSID of currently connected accesspoint -
1.3.6.1.4.1.29456.3.2
# TYPE apSysStatBssid gauge
apSysStatBssid{apSysStatBssid="6A:56:E3:7A:85:47"} 1
--
You received this message because you are subscribed to the Google Groups
"Prometheus Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion visit
https://groups.google.com/d/msgid/prometheus-users/2260733d-7c85-4a99-97cb-782bebd50f77n%40googlegroups.com.