[SNMP4J] Question about SNMPv3 configuration

Clement_Pellerin at ibi.com Clement_Pellerin at ibi.com
Mon Jan 18 16:10:51 CET 2010


You need to learn more about USM and VACM. I recommend "SNMP, SNMPv2, SNMPv3 and RMON 1 and 2" by William Stallings.

Implementing the CommandResponder is not the usual way to do this.
You need to read the SNMP4J How-To document in the AgentPro download.
It explains how to implement your ManagedObjects to interact with the rest of SNMP4J and SNMP4J-Agent.
I wish that precious document was mentioned on the snmp4j.org site.

The sample code to populate the USM and VACM mibs programmatically is in the TestAgent.java file in the SNMP4J-Agent source code.
Notice the TestAgent is an older way of organizing your agent. Also take a look at AgentConfigManager.java as another option.
When I first learned about this, I had my users configured correctly but the VACM view was missing and therefore nothing came back.


From: Ivan Mladenović [mailto:piffta at gmail.com]
Sent: Monday, January 18, 2010 9:49 AM
To: Pellerin, Clement
Subject: Re: [SNMP4J] Question about SNMPv3 configuration

Hi, thank you for answer.
But, I don't understand. Sorry, I don't have experience with SNMP.

I will try to explain my problem.

I have my own MIB file, like this:

IMPORTS
        mib-2
            FROM RFC1213-MIB;

myObjectId OBJECT IDENTIFIER ::= {private 1} -- 1.3.6.1.4.1

myObject OBJECT-TYPE
        SYNTAX Counter
        ACCESS read-write
        STATUS mandatory
        ::= {myObjectId 1}

I have my implementation of CommandResponder interface.
I'm trying to use MIB browser to get value for this object id.
My implementation of CommandResponder will catch GET request operation in processPdu() method.

But I don't now how to send response to the MIB browser. I don't have any errors in my response, and there is no errors in response, but response.getResponse() is null.


More information about the SNMP4J mailing list