Skip to content

Commit

Permalink
Add net-snmp IP-MIB (#679)
Browse files Browse the repository at this point in the history
To walk https://oidref.com/1.3.6.1.2.1.4.20

This can be useful when walking IP address of interfaces

Signed-off-by: Yuwei B <[email protected]>
  • Loading branch information
ibigbug authored Sep 3, 2023
1 parent 2514f7c commit 850e8f1
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 1 deletion.
1 change: 1 addition & 0 deletions generator/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,7 @@ $(MIBDIR)/.net-snmp:
@curl $(CURL_OPTS) -o $(MIBDIR)/HCNUM-TC $(NET_SNMP_URL)/HCNUM-TC.txt
@curl $(CURL_OPTS) -o $(MIBDIR)/HOST-RESOURCES-MIB $(NET_SNMP_URL)/HOST-RESOURCES-MIB.txt
@curl $(CURL_OPTS) -o $(MIBDIR)/IF-MIB $(NET_SNMP_URL)/IF-MIB.txt
@curl $(CURL_OPTS) -o $(MIBDIR)/IP-MIB $(NET_SNMP_URL)/IP-MIB.txt
@curl $(CURL_OPTS) -o $(MIBDIR)/INET-ADDRESS-MIB $(NET_SNMP_URL)/INET-ADDRESS-MIB.txt
@curl $(CURL_OPTS) -o $(MIBDIR)/IPV6-TC $(NET_SNMP_URL)/IPV6-TC.txt
@curl $(CURL_OPTS) -o $(MIBDIR)/NET-SNMP-MIB $(NET_SNMP_URL)/NET-SNMP-MIB.txt
Expand Down
5 changes: 4 additions & 1 deletion generator/generator.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,10 @@ modules:
ignore: true # Lookup metric
ifType:
type: EnumAsInfo

# Default IP-MIB with ipv4InterfaceTable for example.
ip_mib:
walk: [ipv4InterfaceTable]

# Cisco Wireless LAN Controller
cisco_wlc:
walk:
Expand Down
39 changes: 39 additions & 0 deletions snmp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7774,6 +7774,45 @@ modules:
regex: ^(?:(\d*?)(\d{2}))$
- value: 0.0$1
regex: ^(?:^(\d))$
ip_mib:
walk:
- 1.3.6.1.2.1.4.28
metrics:
- name: ipv4InterfaceIfIndex
oid: 1.3.6.1.2.1.4.28.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.28.1.1
indexes:
- labelname: ipv4InterfaceIfIndex
type: gauge
- name: ipv4InterfaceReasmMaxSize
oid: 1.3.6.1.2.1.4.28.1.2
type: gauge
help: The size of the largest IPv4 datagram that this entity can re-assemble
from incoming IPv4 fragmented datagrams received on this interface. - 1.3.6.1.2.1.4.28.1.2
indexes:
- labelname: ipv4InterfaceIfIndex
type: gauge
- name: ipv4InterfaceEnableStatus
oid: 1.3.6.1.2.1.4.28.1.3
type: gauge
help: The indication of whether IPv4 is enabled (up) or disabled (down) on this
interface - 1.3.6.1.2.1.4.28.1.3
indexes:
- labelname: ipv4InterfaceIfIndex
type: gauge
enum_values:
1: up
2: down
- name: ipv4InterfaceRetransmitTime
oid: 1.3.6.1.2.1.4.28.1.4
type: gauge
help: The time between retransmissions of ARP requests to a neighbor when resolving
the address or when probing the reachability of a neighbor. - 1.3.6.1.2.1.4.28.1.4
indexes:
- labelname: ipv4InterfaceIfIndex
type: gauge
keepalived:
walk:
- 1.3.6.1.2.1.207.1.2.5
Expand Down

0 comments on commit 850e8f1

Please sign in to comment.