[SNMP4J] Intercepting gets and sets from the Network Manager to individual cells in an MOTable

Charan, Brad Brad.Charan at fpx.com
Wed May 8 15:41:47 CEST 2013


Thanks Frank -- we ended up extending DefaultMOMutableRow2PC and all is working well.

I notice that there are several, or rather many, managed objects registered by default under your EnterpriseId = 4976.    Are these required by SNMP -- if yes, should we convert these to our enterprise id = 41485.  If no, can/should we suppress these?

Brad

-----Original Message-----
From: snmp4j-bounces at agentpp.org [mailto:snmp4j-bounces at agentpp.org] On Behalf Of Frank Fock
Sent: Thursday, April 04, 2013 4:45 PM
To: snmp4j at agentpp.org
Subject: Re: [SNMP4J] Intercepting gets and sets from the Network Manager to individual cells in an MOTable

Hi Brad,

You might want to read the SNMP4J-Agent instrumentation guide with more conceptual background and detailed examples:

http://www.snmp4j.org/SNMP4J-Agent-1.4-InstrumentationGuide.pdf

The most intuitive approach would be to override the http://www.snmp4j.org/agent/doc/org/snmp4j/agent/mo/DefaultMOMutableRow2PC.html
class by creating your own
http://www.snmp4j.org/agent/doc/org/snmp4j/agent/mo/DefaultMOMutableRow2PCFactory.html

If you can easily integrate an generic solution, then using the http://www.snmp4j.org/agent/doc/org/snmp4j/agent/MOServerLookupListener.html
could also be an option. With that listener you can intercept incoming SET (or GET*) requests and update your ManagedObjects before they have to process the request.

The instrumentation guide has examples for both.

Best regards,
Frank


Am 04.04.2013 18:32, schrieb Charan, Brad:
> We have been tasked to create an SNMP agent for our application.   Our application can have multiple instances within the same JVM, and we have been able to create an agent using MOTables that shows each instance as a row in a table to the Network Manager.    However we are struggling with how to go about intercepting the 'getValue' or 'setValue' to each cell in this table as we have been able to do quite easily for MOScalar - by simply subclassing it and over-riding the getValue and setValue methods.
>
> We don't see the analogue for the MOScalar getValue/setValue in DefaultMOTable.    So, we tried using VariantVariable for each cell in the table.  However, we have found that the VariantVariable is overwritten when a set is received by the SNMP4J from the NetworkManager.  So, the VariantVariableCallback 'updateVariable' works well, until a 'set' is received from the Network Manager -- after which the VariantVariableCallback stops working because the VariableVariable object appears to have been de-referenced.
>
> What is the best way to implement this scenario such that we can intercept the sets and gets to each cell in the table?
>
> Brad Charan
> FPX LLC
> Bloomington, MN, USA
>
>
> This message may contain confidential information, if you are not the intended addressee, please inform us immediately that you have received this e-mail in error, and delete it. We thank you for your cooperation.
> _______________________________________________
> SNMP4J mailing list
> SNMP4J at agentpp.org
> http://lists.agentpp.org/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 at agentpp.org
http://lists.agentpp.org/mailman/listinfo/snmp4j


This message may contain confidential information, if you are not the intended addressee, please inform us immediately that you have received this e-mail in error, and delete it. We thank you for your cooperation.



More information about the SNMP4J mailing list