Frank Fock | 1 Oct 2008 01:52
Favicon

Re: Need Help on LogAdapter - snmp4j

Hi,

Have you set the LogFactory to Log4jLogFactory in your main
class/method with LogFactory.setLogFactory?

Best regards,
Frank

srenivasan rs wrote:
> Hi All,
> 
> I would like to have a quick clarification on how to initialize the 
> logger mentioned in
> org.snmp4j.util.TableUtils.java. I have the copied log4j setting used by 
> my library.
> But, none of the messages from tableUtils are not logged in the log file.
> 
> private static final LogAdapter logger =
>     LogFactory.getLogger(TableUtils.class);
> 
> Please let me know if you know any other changes to the log4j.properties
> 
> Thanks,
> 
> R Srinivasan
> 
> //log4j.properties
> 
> log4j.rootLogger=DEBUG, testAppender
> log4j.appender.testAppender=org.apache.log4j.FileAppender
(Continue reading)

Alexander Fooks | 2 Oct 2008 10:12

RE: catch GETBULK for dynamic table

Hi, Frank,

Thanks for your answer.

I did exactly as in Snmp4jLogMib.java and I want to fill the table each
time when received GETBULK request:

Object updateSource = null;
public void lookupEvent(MOServerLookupEvent event) {

      if (event.getLookupResult() == this.alCustomEntry && 
          (!DefaultMOQuery.isSameSource(event.getQuery(),
updateSource))) {
    	  updateSource = event.getSource();
        //   
        fillTableFromDB();
      }

}

But it entered at endless loop on each GETBULK request.
Would you advise how to define "if" for this permanent case if it's
possible.
and where I may wipe the data in table when response has been sent?

Thank you.

 
Alex Fooks

(Continue reading)

Alexander Fooks | 2 Oct 2008 10:30

Use snmp4j-agent as forwarder

Hi,

I need to redirect some of SNMP requests to other agent supports
HOST-RESOURCES and SNMPv2-MIB.

Could I do it with snmp4j-agent? 
Is ProxyForwarderImpl class supports this? 
How to use it?

Thank you

BR
Alex Fooks
Tzahi Bergman | 2 Oct 2008 10:46
Favicon

Creating a row - using TableUtils

Hi,
I've created a row using TableUtils.
The problem that i have is adding a row that has two indexes - meaning
that the row index contains oid that has two numbers,for some reason it
doesn't work..
In the ResponseEvent i got:
"RESPONSE[requestID=2039348526, errorStatus=Unable to create object(11),
errorIndex=1, VBS[1.3.6.1.4.1.30767.1.1.2.1.1.5.7.2 = 4;
1.3.6.1.4.1.30767.1.1.2.1.1.1.7.2 = 3; 1.3.6.1.4.1.30767.1.1.2.1.1.2.7.2
= 3; 1.3.6.1.4.1.30767.1.1.2.1.1.3.7.2 = 3;
1.3.6.1.4.1.30767.1.1.2.1.1.5.7.2 = 4]]"

Is it possible that the mechanism of adding row doesn't work with two
indexes???
Frank Fock | 3 Oct 2008 00:39
Favicon

Re: Creating a row - using TableUtils

Hi,

Without MIB defintion, I am afraid, we cannot help.
Why are you setting the same object twice in the
same request?

Best regards,
Frank

Tzahi Bergman wrote:
> Hi,
> I've created a row using TableUtils.
> The problem that i have is adding a row that has two indexes - meaning
> that the row index contains oid that has two numbers,for some reason it
> doesn't work..
> In the ResponseEvent i got:
> "RESPONSE[requestID=2039348526, errorStatus=Unable to create object(11),
> errorIndex=1, VBS[1.3.6.1.4.1.30767.1.1.2.1.1.5.7.2 = 4;
> 1.3.6.1.4.1.30767.1.1.2.1.1.1.7.2 = 3; 1.3.6.1.4.1.30767.1.1.2.1.1.2.7.2
> = 3; 1.3.6.1.4.1.30767.1.1.2.1.1.3.7.2 = 3;
> 1.3.6.1.4.1.30767.1.1.2.1.1.5.7.2 = 4]]"
> 
> Is it possible that the mechanism of adding row doesn't work with two
> indexes???
>  
>  
> 
> _______________________________________________
> SNMP4J mailing list
> SNMP4J@...
(Continue reading)

Frank Fock | 3 Oct 2008 00:43
Favicon

Re: Use snmp4j-agent as forwarder

Hi Alex,

The ProxyForwarderImpl can only be used
for proxy forwarder applications as defined
in RFC 3413.

OID based forwarding is something different.
Here you will have to implement your own
ManagedObject instance to provide such
functionality.

Best regards,
Frank

Alexander Fooks wrote:
> Hi,
> 
> I need to redirect some of SNMP requests to other agent supports
> HOST-RESOURCES and SNMPv2-MIB.
> 
> Could I do it with snmp4j-agent? 
> Is ProxyForwarderImpl class supports this? 
> How to use it?
> 
> Thank you
> 
> BR
> Alex Fooks
> 
> 
(Continue reading)

rashi malviya | 3 Oct 2008 08:02
Picon

Microsoft OIDs not working

Hello SNMP4J users,

I'm using the SNMP4J library to monitor the various CPU, Memory, Network
statistics. Tool works fine for the generic OIDs but for the Microsoft
specific OIDs (1.3.6.1.4.1.311.1.1.3.1.1.3.1.4)its not working. I am
attaching my test code here.
For the first two OIDs its giving the result but for the 3rd one, the output
is something like this..

PDU Resopnse is : RESPONSE[requestID=1779867673, errorStatus=Success(0),
errorIndex=0, VBS[1.3.6.1.2.1.25.3.3.1.2.2 = 4; 1.3.6.1.2.1.25.2.2.0 =
2088428;* 1.3.6.1.4.1.311.1.9 = endOfMibView]*]

Any help will be appreciated.
Thanks in advance.

public class MySNMP {

    PDU requestPDU = null;
    Snmp snmp = null;
    CommunityTarget target = null;
    String responseString = null;
    Address targetAddress = GenericAddress.parse("udp:127.0.0.1/161");

    public MySNMP() throws IOException, InterruptedException {

        PDU requestPDU = null;
        String responseString = null;
        Address targetAddress = GenericAddress.parse("udp:127.0.0.1/161");
        TransportMapping transport = new DefaultUdpTransportMapping();
(Continue reading)

amit rehalia | 6 Oct 2008 06:13
Picon

(no subject)

mailing list subscription
Mike Nuss | 8 Oct 2008 22:30

Context-sensitive columnar value validation

I'm wondering how to validate columnar values.  For scalars, there's an isValueOK method that I can
override.  For columns it seems I'm stuck with using an MOValueValidationListener.  But the validate
method contains only the value of the variable, and not enough context to know which row of the table is
being modified.  For example, I'd like to return an INCONSISTENT_VALUE error if the user has tried to set
a value that may be valid in some cases, but is not consistent with the rest of the row.

Any suggestions?

Thanks,
Mike
Mike Nuss | 8 Oct 2008 22:32

RE: Context-sensitive columnar value validation

Ack! adding line wraps...

I'm wondering how to validate columnar values.  For scalars, there's an
isValueOK method that I can override.  For columns it seems I'm stuck with
using an MOValueValidationListener.  But the validate method contains only
the value of the variable, and not enough context to know which row of the
table is being modified.  For example, I'd like to return an
INCONSISTENT_VALUE error if the user has tried to set a value that may be
valid in some cases, but is not consistent with the rest of the row.

Any suggestions?

Thanks,
Mike

Gmane