I am working on a project to gather the MAC address and IP which is on a
specific port on a network switch. I've been able to gather this
information with the below SNMP config but the challenge is the MAC address
comes back against the physical port index and the IPs come back against
the VLANs index which is expected. The challenge I am having is using
promql to join the data so I can show the IP associated with the MAC
address on the physical port.
walk:
- 1.3.6.1.2.1.17.1.4.1
- 1.3.6.1.2.1.17.4.3.1
- 1.3.6.1.2.1.4.22.1
- 1.3.6.1.2.1.4.35.1
metrics:
- name: dot1dBasePortIfIndex
oid: 1.3.6.1.2.1.17.1.4.1.2
type: gauge
help: The value of the instance of the ifIndex object, defined in
MIB-II, for
the interface corresponding to this port. - 1.3.6.1.2.1.17.1.4.1.2
indexes:
- labelname: dot1dBasePort
type: gauge
- name: dot1dTpFdbPort
oid: 1.3.6.1.2.1.17.4.3.1.2
type: gauge
help: Either the value '0', or the port number of the port on which a
frame
having a source address equal to the value of the corresponding
instance of
dot1dTpFdbAddress has been seen - 1.3.6.1.2.1.17.4.3.1.2
indexes:
- labelname: dot1dTpFdbAddress
type: PhysAddress48
fixed_size: 6
- name: dot1dTpFdbStatus
oid: 1.3.6.1.2.1.17.4.3.1.3
type: EnumAsInfo
help: The status of this entry - 1.3.6.1.2.1.17.4.3.1.3
indexes:
- labelname: dot1dTpFdbAddress
type: PhysAddress48
fixed_size: 6
enum_values:
1: other
2: invalid
3: learned
4: self
5: mgmt
- name: ipNetToMediaPhysAddress
oid: 1.3.6.1.2.1.4.22.1.2
type: PhysAddress48
help: ' - 1.3.6.1.2.1.4.22.1.2'
indexes:
- labelname: ipNetToMediaIfIndex
type: gauge
- labelname: ipNetToMediaNetAddress
type: InetAddressIPv4
- name: ipNetToMediaType
oid: 1.3.6.1.2.1.4.22.1.4
type: EnumAsInfo
help: ' - 1.3.6.1.2.1.4.22.1.4'
indexes:
- labelname: ipNetToMediaIfIndex
type: gauge
- labelname: ipNetToMediaNetAddress
type: InetAddressIPv4
enum_values:
1: other
2: invalid
3: dynamic
4: static
- name: ipNetToPhysicalIfIndex
oid: 1.3.6.1.2.1.4.35.1.1
type: gauge
help: The index value that uniquely identifies the interface to which
this entry
is applicable - 1.3.6.1.2.1.4.35.1.1
indexes:
- labelname: ipNetToPhysicalIfIndex
type: gauge
- labelname: ipNetToPhysicalNetAddress
type: InetAddress
- name: ipNetToPhysicalNetAddressType
oid: 1.3.6.1.2.1.4.35.1.2
type: EnumAsInfo
help: The type of ipNetToPhysicalNetAddress. - 1.3.6.1.2.1.4.35.1.2
indexes:
- labelname: ipNetToPhysicalIfIndex
type: gauge
- labelname: ipNetToPhysicalNetAddress
type: InetAddress
enum_values:
0: unknown
1: ipv4
2: ipv6
3: ipv4z
4: ipv6z
16: dns
- name: ipNetToPhysicalNetAddress
oid: 1.3.6.1.2.1.4.35.1.3
type: InetAddress
help: The IP Address corresponding to the media-dependent `physical'
address
- 1.3.6.1.2.1.4.35.1.3
indexes:
- labelname: ipNetToPhysicalIfIndex
type: gauge
- labelname: ipNetToPhysicalNetAddress
type: InetAddress
- name: ipNetToPhysicalPhysAddress
oid: 1.3.6.1.2.1.4.35.1.4
type: PhysAddress48
help: The media-dependent `physical' address - 1.3.6.1.2.1.4.35.1.4
indexes:
- labelname: ipNetToPhysicalIfIndex
type: gauge
- labelname: ipNetToPhysicalNetAddress
type: InetAddress
- name: ipNetToPhysicalLastUpdated
oid: 1.3.6.1.2.1.4.35.1.5
type: gauge
help: The value of sysUpTime at the time this entry was last updated
- 1.3.6.1.2.1.4.35.1.5
indexes:
- labelname: ipNetToPhysicalIfIndex
type: gauge
- labelname: ipNetToPhysicalNetAddress
type: InetAddress
- name: ipNetToPhysicalType
oid: 1.3.6.1.2.1.4.35.1.6
type: EnumAsInfo
help: The type of mapping - 1.3.6.1.2.1.4.35.1.6
indexes:
- labelname: ipNetToPhysicalIfIndex
type: gauge
- labelname: ipNetToPhysicalNetAddress
type: InetAddress
enum_values:
1: other
2: invalid
3: dynamic
4: static
5: local
- name: ipNetToPhysicalState
oid: 1.3.6.1.2.1.4.35.1.7
type: EnumAsInfo
help: The Neighbor Unreachability Detection state for the interface
when the
address mapping in this entry is used - 1.3.6.1.2.1.4.35.1.7
indexes:
- labelname: ipNetToPhysicalIfIndex
type: gauge
- labelname: ipNetToPhysicalNetAddress
type: InetAddress
enum_values:
1: reachable
2: stale
3: delay
4: probe
5: invalid
6: unknown
7: incomplete
- name: ipNetToPhysicalRowStatus
oid: 1.3.6.1.2.1.4.35.1.8
type: EnumAsInfo
help: The status of this conceptual row - 1.3.6.1.2.1.4.35.1.8
indexes:
- labelname: ipNetToPhysicalIfIndex
type: gauge
- labelname: ipNetToPhysicalNetAddress
type: InetAddress
enum_values:
1: active
2: notInService
3: notReady
4: createAndGo
5: createAndWait
6: destroy
--
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 on the web visit
https://groups.google.com/d/msgid/prometheus-users/b2bcafb8-cdb1-463b-8a5e-03ac9d4f1daen%40googlegroups.com.