I am an snmp beginner and have created a custom MIB and included it in snmpd.conf via pass persist.
pass_persist .1.3.6.1.4.1.56947.1.1 /usr/bin/env python3 -u my_script.py
While I can successfully query the data, the returned data is a mix between the OIDs and the textual representation of OIDs.
Something like
SNMPv2-SMI::enterprises.56947.1.1.1
If I query, for example the UCD MIB (.1.3.6.1.4.1.2021)
I get the full textual representation, like UCD-SNMP-MIB::memIndex.0
which corresponds to .1.3.6.1.4.1.2021.4.1
As far as I know the UCD Mibs have been merged into net-snmp itself and may work differently than my own MIB.
My MIB (ommited some parts for brevity)
MY-MIB DEFINITIONS ::= BEGIN
IMPORTS
MODULE-IDENTITY, enterprises, Integer32
FROM SNMPv2-SMI
myMIB MODULE-IDENTITY
-- identify stuff
::= { enterprises 56947 }
product1 OBJECT IDENTIFIER ::= { myMIB 1 }
product1Data OBJECT IDENTIFIER ::= { product1 1 }
objectCount OBJECT-TYPE
SYNTAX Integer32
MAX-ACCESS read-only
STATUS current
DESCRIPTION "test"
::= { product1Data 1 }
END
But is this behavior by design or am I missing something?
My excpectation/wish would be to receive something like MY-MIB::objectCount