ports/sysutils/snmp_exporter/files/generator-pf.yml

54 lines
1.4 KiB
YAML

# Cut-down example of if_mib setup done using SNMPv3 (edit the various
# $snmpv3-... as needed) and information from OPENBSD-PF-MIB, based on
# https://yetiops.net/posts/openbsd-snmp-exporter/.
auths:
priv_snmpv3:
version: 3
username: "$snmpv3-user"
password: "$snmpv3-authkey"
priv_password: "$snmpv3-enckey"
security_level: authPriv
auth_protocol: SHA
priv_protocol: AES
modules:
if_mib:
walk: [sysUpTime, interfaces, ifXTable]
lookups:
- source_indexes: [ifIndex]
lookup: ifAlias
- source_indexes: [ifIndex]
# Use OID to avoid conflict with PaloAlto PAN-COMMON-MIB.
lookup: 1.3.6.1.2.1.2.2.1.2 # ifDescr
- source_indexes: [ifIndex]
# Use OID to avoid conflict with Netscaler NS-ROOT-MIB.
lookup: 1.3.6.1.2.1.31.1.1.1.1 # ifName
overrides:
ifAlias:
ignore: true # Lookup metric
ifDescr:
ignore: true # Lookup metric
ifName:
ignore: true # Lookup metric
ifType:
type: EnumAsInfo
openbsd_pf:
walk:
- pfRunning
- pfRuntime
- pfDebug
- pfHostid
- pfStateCount
- pfStateSearches
- pfStateInserts
- pfStateRemovals
- pfIfTable
- pfIfDescr
- pfIfType
- pfIfIndex
lookups:
- source_indexes: [pfIfIndex]
lookup: pfIfDescr
drop_source_indexes: false