Date: Wed, 21 Feb 2018 00:50:14 +0700 From: Eugene Grosbein <eugen@grosbein.net> To: Victor Sudakov <vas@mpeks.tomsk.su>, freebsd-net@freebsd.org Subject: Re: bsnmpd and arbitrary OIDs Message-ID: <5A8C5FD6.3070201@grosbein.net> In-Reply-To: <20180220160044.GA79151@admin.sibptus.transneft.ru> References: <20180220160044.GA79151@admin.sibptus.transneft.ru>
next in thread | previous in thread | raw e-mail | index | archive | help
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.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?5A8C5FD6.3070201>