bsnmpd and arbitrary OIDs

Eugene Grosbein eugen at grosbein.net
Tue Feb 20 17:50:35 UTC 2018


20.02.2018 23:00, Victor Sudakov wrote:

> Is it possible to configure bsnmpd to return an arbitrary value for an OID, e.g.
> 
> snmpget -On -v1 -c public localhost .1.3.6.1.4.1.34498.2.1.1.1.2.0
> 
> should always return 
> 
> .1.3.6.1.4.1.34498.2.1.1.1.2.0 = STRING: "54.6 V"
> 
> I need this for debugging a network monitoring system.
> 
> Thank you very much in advance.

You can do that with net-mgmt/bsnmp-ucd addon and little addition to /etc/snmpd.config:

begemotSnmpdModulePath."ucd" = "/usr/local/lib/snmp_ucd.so"

%ucd
extNames.0 =    "kern.clockrate"
extCommand.0    = "/sbin/sysctl -n kern.clockrate"

Refer to bsnmp-ucd(8) manual page for defails.


More information about the freebsd-net mailing list