On 2015-04-23, andy <[email protected]> wrote: > Hi, > > This should be a simple one ;) > > I have configured and started snmpd, and then used snmpwalk ("snmpwalk > -v2c -c public 127.0.0.1:161 .") to walk the oid tree, and the only branch > I see is OPENBSD-PF-MIB. Tested on 5.6. > > I don't seem to see any output for OPENBSD-BASE-MIB.txt, > OPENBSD-CARP-MIB.txt, OPENBSD-MEM-MIB.txt, OPENBSD-RELAYD-MIB (pending > 5.7), and OPENBSD-SENSORS-MIB.txt. > > What do we need to do to enable these? Or is snmpwalk just missing them? > I'm being dumb? > > Cheers, Andy. > >
You need to start the walk from a suitable location. "If no OID argument is present, snmpwalk will search the subtree rooted at SNMPv2-SMI::mib-2 (including any MIB object values from other MIB modules, that are defined as lying within this subtree)." The following examples assume that you have the OpenBSD MIBs loaded (these are setup by default in the net-snmp package, but you'll need to add them yourself if querying from another OS). $ snmpwalk -v2c -c public localhost SNMPv2-MIB::sysORID SNMPv2-MIB::sysORID.1 = OID: SNMPv2-SMI::mib-2 SNMPv2-MIB::sysORID.2 = OID: IP-MIB::ip SNMPv2-MIB::sysORID.3 = OID: IP-FORWARD-MIB::ipForward SNMPv2-MIB::sysORID.4 = OID: SNMPv2-MIB::snmp SNMPv2-MIB::sysORID.5 = OID: BRIDGE-MIB::dot1dBridge SNMPv2-MIB::sysORID.6 = OID: HOST-RESOURCES-MIB::host SNMPv2-MIB::sysORID.7 = OID: IF-MIB::ifMIB SNMPv2-MIB::sysORID.8 = OID: SNMPv2-SMI::enterprises.2021.13.15 SNMPv2-MIB::sysORID.9 = OID: OPENBSD-BASE-MIB::pfMIBObjects SNMPv2-MIB::sysORID.10 = OID: OPENBSD-BASE-MIB::sensorsMIBObjects SNMPv2-MIB::sysORID.11 = OID: OPENBSD-BASE-MIB::memMIBObjects SNMPv2-MIB::sysORID.12 = OID: OPENBSD-BASE-MIB::carpMIBObjects SNMPv2-MIB::sysORID.13 = OID: SNMPv2-SMI::snmpModules.10.2.1 SNMPv2-MIB::sysORID.14 = OID: SNMPv2-SMI::snmpModules.15.1.1 $ snmpwalk -v2c -c public localhost OPENBSD-BASE-MIB::carpMIBObjects OPENBSD-CARP-MIB::carpAllow.0 = INTEGER: true(1) OPENBSD-CARP-MIB::carpPreempt.0 = INTEGER: 0 OPENBSD-CARP-MIB::carpLog.0 = INTEGER: false(2) OPENBSD-CARP-MIB::carpIfNumber.0 = INTEGER: 0 OPENBSD-CARP-MIB::carpIpPktsRecv.0 = Counter64: 0 OPENBSD-CARP-MIB::carpIp6PktsRecv.0 = Counter64: 0 OPENBSD-CARP-MIB::carpPktDiscardsForBadInterface.0 = Counter64: 0 OPENBSD-CARP-MIB::carpPktDiscardsForWrongTtl.0 = Counter64: 0 OPENBSD-CARP-MIB::carpPktShorterThanHeader.0 = Counter64: 0 OPENBSD-CARP-MIB::carpPktDiscardsForBadChecksum.0 = Counter64: 0 OPENBSD-CARP-MIB::carpPktDiscardsForBadVersion.0 = Counter64: 0 OPENBSD-CARP-MIB::carpPktDiscardsForTooShort.0 = Counter64: 0 OPENBSD-CARP-MIB::carpPktDiscardsForBadAuth.0 = Counter64: 0 OPENBSD-CARP-MIB::carpPktDiscardsForBadVhid.0 = Counter64: 0 OPENBSD-CARP-MIB::carpPktDiscardsForBadAddressList.0 = Counter64: 0 OPENBSD-CARP-MIB::carpIpPktsSent.0 = Counter64: 0 OPENBSD-CARP-MIB::carpIp6PktsSent.0 = Counter64: 0 OPENBSD-CARP-MIB::carpNoMemory.0 = Counter64: 0 OPENBSD-CARP-MIB::carpTransitionsToMaster.0 = Counter64: 0 You can use "iso.org.dod.internet.private.enterprises.openBSD" to show all of the vendor OIDs. And you can use snmpctl rather than Net-SNMP; e.g. $ snmpctl walk sym oid iso.org.dod.internet.private.enterprises.openBSD | head openBSD.pfMIBObjects.pfInfo.pfRunning.0=1 openBSD.pfMIBObjects.pfInfo.pfRuntime.0=74529800 openBSD.pfMIBObjects.pfInfo.pfDebug.0=3 openBSD.pfMIBObjects.pfInfo.pfHostid.0="0xb438d4c7" openBSD.pfMIBObjects.pfCounters.pfCntMatch.0=1662286 openBSD.pfMIBObjects.pfCounters.pfCntBadOffset.0=0 openBSD.pfMIBObjects.pfCounters.pfCntFragment.0=3 openBSD.pfMIBObjects.pfCounters.pfCntShort.0=2 openBSD.pfMIBObjects.pfCounters.pfCntNormalize.0=0 openBSD.pfMIBObjects.pfCounters.pfCntMemory.0=0 AFAIK the relayd support is only so that relayd can send traps, I don't think it provides anything that you can query.

