Frank Fock | 1 May 2011 23:26
Favicon

Re: agent problem

Hi,

You could also use AgenPro which provides a
simulation agent out-of-the-box and
built-in.

Have you read the PDF
http://www.snmp4j.org/SNMP4J-Agent-1.4-InstrumentationGuide.pdf
on how to instrument SET requests?

Best regards,
Frank

On 30.04.2011 08:29, le goualher yannick wrote:
> Hello,
>
> I would like so simulate an SNMP agent because I'd like to create an SNMP
> manager and test it with the agent.
> I succeeded in creating the snmp manager but i've trouble in creating the
> SNMP agent. I read your angent sample code and i succeeded in creating the
> basic agent.
>
> When i make get request from the manager it works but i don't know how to
> make set request... and i don't find any documentation on this...
> I will join you my code, which is very simple.
>
> In fact i would like to do 2 things:
>   - make set request from the manager to the agent
>   - from the interface of the agent: change values directly from the agent
> interface (eg: ap adress)
(Continue reading)

Chris Janicki | 2 May 2011 21:37

Process all PDUs from any community

I need to create a sort of PDU router that distributes PDUs based on the community string.  But I don't see a way
to access that info.  Is that possible without implementing from scratch down at the BER level?
George Vasilakis | 4 May 2011 10:18
Picon

SNMP4J v2 Inform - No acknowledgment received

Hi.

I am new to snmp4j and have implemented a simple trap receiver using 
code from the examples.
I am using v2c informs but no acknowledgments are being received.

Here is the code for the receiver:

           threadPool = ThreadPool.create("Trap", 10);
           dispatcher = new MultiThreadedMessageDispatcher(threadPool, 
new MessageDispatcherImpl());
           listenAddress = 
GenericAddress.parse(System.getProperty("snmp4j.listenAddress", 
"udp:127.0.0.1/8080"));

           snmp = new Snmp(dispatcher);
           snmp.getMessageDispatcher().addMessageProcessingModel(new 
MPv1());
           snmp.getMessageDispatcher().addMessageProcessingModel(new 
MPv2c());
           snmp.addNotificationListener(listenAddress, this);
           snmp.listen();

Here is the code for the sender:

         Address targetAddress = GenericAddress.parse("udp:127.0.0.1/8080");
         TransportMapping transport = new DefaultUdpTransportMapping();
         Snmp snmp = new Snmp(transport);

         CommunityTarget target = new CommunityTarget();
(Continue reading)

BADENHOP Wim | 4 May 2011 14:23
Favicon

getting the authoritative engine id

Hi,

This is more or less a general question, but since this is the place
with the SNMP experts, I will ask it here :-)

I am writing an snmp manager (in snmp4j) which has to deal with several
agents. The communication is snmp v3 so the manager has to get the
engine ids from the agents.

What I do now is that I get the authoritative engine id via
"discoverAuthoritativeEngineID" every time I send an snmp request to the
agent. This has the advantage that in case an agent has to be replaced,
no configuration change has to be made on the manager. However the
drawback is of course the overhead when sending a request.

Does anybody have an "ideal" solution for this?

Regards Wim

____
 
This message and any files transmitted with it are legally privileged and intended for the sole use of the
individual(s) or entity to whom they are addressed. If you are not the intended recipient, please notify
the sender by reply and delete the message and any attachments from your system. Any unauthorised use or
disclosure of the content of this message is strictly prohibited and may be unlawful.
 
Nothing in this e-mail message amounts to a contractual or legal commitment on the part of EUROCONTROL,
unless it is confirmed by appropriately signed hard copy.
 
Any views expressed in this message are those of the sender.
(Continue reading)

oumniya zrikem | 8 May 2011 15:02
Picon

agent simulation

Hi,

I tested your snmp agent with the snmp4j agent toolbox.

I tried to understand how to modify the agent to fit my needs.
here is my code, i used your snmp test agent.

        OID interfacesTable = new OID(".1.3.6.1.2.1.2.2.1");

        MOTableBuilder builder = new MOTableBuilder(interfacesTable)

.addColumnType(SMIConstants.SYNTAX_INTEGER,MOAccessImpl.ACCESS_READ_WRITE)

.addColumnType(SMIConstants.SYNTAX_OCTET_STRING,MOAccessImpl.ACCESS_READ_WRITE)

.addColumnType(SMIConstants.SYNTAX_INTEGER,MOAccessImpl.ACCESS_READ_WRITE)

.addColumnType(SMIConstants.SYNTAX_INTEGER,MOAccessImpl.ACCESS_READ_WRITE)

.addColumnType(SMIConstants.SYNTAX_GAUGE32,MOAccessImpl.ACCESS_READ_WRITE)

.addColumnType(SMIConstants.SYNTAX_OCTET_STRING,MOAccessImpl.ACCESS_READ_WRITE)

.addColumnType(SMIConstants.SYNTAX_INTEGER,MOAccessImpl.ACCESS_READ_WRITE)

.addColumnType(SMIConstants.SYNTAX_INTEGER,MOAccessImpl.ACCESS_READ_WRITE)

            .addRowValue(new Integer32(3))
            .addRowValue(new OctetString("loopback"))
//1.3.6.1.2.1.2.2.1.2.1
(Continue reading)

Binh Le | 11 May 2011 07:55
Picon

Can snmp4j be used as an full SNMP agent stack?

Hi,

I'm looking for a Java-base SNMP agent stack which can be embedded to
a system and respond to SNMP inquiries from external host, basically
similar to the snmpd agent from Net-SNMP or SNMP Research, but running
on Java.

Can snmp4j provide the SNMP agent functionality like that?

Thanks,
Binh
Chris Janicki | 11 May 2011 23:51

Re: Process all PDUs from any community

Never mind... everything I need to retrieve community and related info is in SNMP4J's
CommandResponderEvent.  (See also RFC 3411 and 3412.)  

Thanks Frank and Jochen for your open-source access to SNMP4J.  I'm glad I was forced to look deeper at the
source... I now have extra confidence in the quality of your product.
Favicon

SNMP 4J version

Hello Dears,

I am having a question on SNMP 4J version. I have
snmp4j-1.11.2-distribution.zip and now I can see
snmp4j-1.11.3-distribution.zip on the website, so can you tell me what
the difference between these two versions is?

--

With Thanks & Regards,

Akshay Ballarpure

Motorola Hyderabad, INDIA

(Office:  +91-40-4472-4112
Favicon

NoSuchMethodError with snmp4j-1.11.2-distribution.zip

Hello,

I am having an issue while starting our application with SNMP4J JAR
(snmp4j-1.11.2-distribution.zip), however it works fine with older
version. 

Stack trace is shown below,

INFO   | jvm 6    | 2011/05/12 16:35:45 | Exception in thread "main"
java.lang.NoSuchMethodError:
org.snmp4j.util.MultiThreadedMessageDispatcher.<init>(Lorg/snmp4j/util/T
hreadPool;Lorg/snmp4j/MessageDispatcher;)V

INFO   | jvm 6    | 2011/05/12 16:35:45 |       at
com.motorola.nsm.common.fm.SnmpTrapHandler.init(SnmpTrapHandler.java:437
)

INFO   | jvm 6    | 2011/05/12 16:35:45 |       at
com.motorola.nsm.common.fm.SnmpTrapHandler.<init>(SnmpTrapHandler.java:1
51)

INFO   | jvm 6    | 2011/05/12 16:35:45 |       at
com.motorola.nsm.common.fm.SNMPMgr.<init>(SNMPMgr.java:284)

INFO   | jvm 6    | 2011/05/12 16:35:45 |       at
com.motorola.nsm.common.fm.SNMPMgr.main(SNMPMgr.java:1342)

Can you tell me what is the root cause for this issue? Your urgent reply
is appreciated...Thanks.

(Continue reading)

Chris Janicki | 12 May 2011 15:57

Re: NoSuchMethodError with snmp4j-1.11.2-distribution.zip

Looks like the constructor for MultiThreadedMessageDispatcher has changed.  You'll have to update your
source code in com.motorola.nsm.common.fm.SnmpTrapHandler, at line 437.

On May 12, 2011, at 7:08 AM, BALLARPURE AKSHAY GHANSHYAM-VGCD78 wrote:

> Hello,
> 
> I am having an issue while starting our application with SNMP4J JAR
> (snmp4j-1.11.2-distribution.zip), however it works fine with older
> version. 
> 
> Stack trace is shown below,
> 
> 
> 
> INFO   | jvm 6    | 2011/05/12 16:35:45 | Exception in thread "main"
> java.lang.NoSuchMethodError:
> org.snmp4j.util.MultiThreadedMessageDispatcher.<init>(Lorg/snmp4j/util/T
> hreadPool;Lorg/snmp4j/MessageDispatcher;)V
> 
> INFO   | jvm 6    | 2011/05/12 16:35:45 |       at
> com.motorola.nsm.common.fm.SnmpTrapHandler.init(SnmpTrapHandler.java:437
> )
> 
> INFO   | jvm 6    | 2011/05/12 16:35:45 |       at
> com.motorola.nsm.common.fm.SnmpTrapHandler.<init>(SnmpTrapHandler.java:1
> 51)
> 
> INFO   | jvm 6    | 2011/05/12 16:35:45 |       at
> com.motorola.nsm.common.fm.SNMPMgr.<init>(SNMPMgr.java:284)
(Continue reading)


Gmane