Hi,

Yes, generally that is that simple. However, also the snapshot agent needs some MIBs to control its security settings. In your case, the object registration clashes
here.
You can overwrite the getContext(MOGroup mibGroup) method of the SnapshotAgent (BaseAgent) in order to define a different context for the standard SNMP MIBs of
your snapshot agent. Alternatively, you may also overwriten the method

  protected void registerSnmpMIBs() {
    try {
      snmpTargetMIB.registerMOs(server, getContext(snmpTargetMIB));
snmpNotificationMIB.registerMOs(server, getContext(snmpNotificationMIB));
      vacmMIB.registerMOs(server, getContext(vacmMIB));
      usmMIB.registerMOs(server, getContext(usmMIB));
      snmpv2MIB.registerMOs(server, getContext(snmpv2MIB));
      snmpFrameworkMIB.registerMOs(server, getContext(snmpFrameworkMIB));
      snmpCommunityMIB.registerMOs(server, getContext(snmpCommunityMIB));
      snmp4jLogMIB.registerMOs(server, getContext(snmp4jLogMIB));
      if (snmp4jConfigMIB != null) {
        snmp4jConfigMIB.registerMOs(server, getContext(snmp4jConfigMIB));
      }
      snmpProxyMIB.registerMOs(server, getContext(snmpProxyMIB));
      registerManagedObjects();
    }
    catch (DuplicateRegistrationException ex) {
      ex.printStackTrace();
    }
  }

In order to not register those standard MIBs at all or on a different context.
If you register any MIBs on a non-default context you need to setup the VACM
accordingly to be able to access those objects. The agent should work anyway.

Hope this helps.

Best regards,
Frank

Am 10.03.2014 15:07, schrieb Matt Bailey:
java -jar /Users/mattbailey/Downloads/snmp4j-clt-2.0/snmp4j-clt.jar -L "30
a1 30 da ae 6d cb fe"  "LuzCt68C" -v 2c -c public create-snapshot
/tmp/mibdump.sf 10.218.155.62/161 1.3.6.1


I need some help understanding how to use the SnapshotAgent.


I created a snapshot using the following:

java -jar SNMP4J-CLT.jar -v 2c -c public create-snapshot /tmp/mibdump.sf
<device_ip>/161 1.3.6


The device is a remote SNMP agent.  The dump was created in the tmp
directory.


I then tried to run the snmp4j agent using that dump:

java -cp <snmp4j files> org.snmp4j.agent.test.SnapshotAgent /tmp/mibdump.sf
0.0.0.0/4700


The agent starts but it conflicts with entries already registers and gives
this warning:

"228 [main] WARN org.snmp4j.agent.test.SnapshotAgent  - Could not register
snapshot subtree '1.3.6.1' with <all the oids I am trying to register
listed here>".


I just want to record a snapshot of a remote device and then start an agent
using it as a seed.  Is this possible?


Thanks
_______________________________________________
SNMP4J mailing list
SNMP4J@agentpp.org
https://s16675406.onlinehome-server.info/mailman/listinfo/snmp4j

--
---
AGENT++
Maximilian-Kolbe-Str. 10
73257 Koengen, Germany
https://agentpp.com
Phone: +49 7024 8688230
Fax:   +49 7024 8688231

_______________________________________________
SNMP4J mailing list
SNMP4J@agentpp.org
https://s16675406.onlinehome-server.info/mailman/listinfo/snmp4j

Reply via email to