On Fri, Jan 28, 2022 at 09:21:04PM +0000, Winston Gadsby wrote: > Hi, > I'm running a subagent based on python-netsnmpagent, along with the > distribution snmpd (net-snmp) agent on a Debian embedded system. I'm using > the version of snmpd that comes default with the distribution - 5.7.3. I > have a custom MIB for my new variables, similar to SIMPLE-MIB.txt in the > python-netsnmpagent example. Through the standard snmp command line commands > I am able to read and write to the standard MIB defined OIDs, and to the new > OIDs in my MIB, without issue. > > I would like to also be able to take over management of sysContact and > sysLocation through my subagent. This makes it easier to control these > variables through my outside gui. I've tried registering > SNMPv2-MIB::sysContact and SNMPv2-MIB::sysLocation through the agentx socket, > but receive error 263 - duplicate registration. It seems the primary agent > has already registered these variables and won't give up control. > > How does the agent know which variables the subagent can register and which > it cannot? Is my error due to another cause? My custom MIB is located in > the same directory as the rest of the system MIBs, in the search path - > /usr/share/snmp/mibs. When I register a variable from my MIB, the master > agent accepts it. When I attempt to register sysContact or sysLocation it is > denied. If all the MIBs are stored together, how does it know my SIMPLE-MIB > objects can be registered, but the others cannot? Is there configuration > somewhere else that determines which MIB variables I can register and which I > cannot? Am I only able to register variables in the new MIB? How does it > know which MIBs are custom and which are standard? I've checked the > snmpd.conf file, and it looks like I can define OID trees that trigger > external programs, but there doesn't appear to be configuration for which > OIDs are under master control and which can be controlled by the subagent, > for normal snmp command line access. > > Is there perhaps a better way of going about doing this? > > I've gone through the mail lists and haven't been able to find an answer to > this question. Any help/pointers on this would be much appreciated. Thank > you,
If I were to do this I would look at the PRIORITY argument to agentx-register-PDU. /MF _______________________________________________ Net-snmp-coders mailing list Net-snmp-coders@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/net-snmp-coders