SnmpAppender extention suggestion (was: RE: Joe SNMP facade bug)

2002-10-15 Thread Thomas Muller

Add interface:

public abstract interface SysupTimeResolver {
public abstract long getSysupTime();
}

Add the following to SNMPAppender:

private static final SysupTimeResolver DEFAULT_SYSUP_TIME_RESOLVER =
new SysupTimeResolver() {

long time = System.currentTimeMillis();

public long getSysupTime() {
return( System.currentTimeMillis() - time );
}

};

private SysupTimeResolver sysupTimeResolver = DEFAULT_SYSUP_TIME_RESOLVER;

public void setSysupTimeResolverClass( String value ) {
sysupTimeResolver = ( SysupTimeResolver )
OptionConverter.instantiateByClassName( value,
SysupTimeResolver.class,
DEFAULT_SYSUP_TIME_RESOLVER );
}

--

Thomas

| -Original Message-
| From: Mark Masterson [mailto:[EMAIL PROTECTED]]
| Sent: 15 October 2002 19:59
| To: Log4J Users List
| Subject: RE: Joe SNMP facade bug
|
|
| Hi Steve,
|
| Ahh, brilliant!
|
| the SnmpOctetString class in the JoeSnmp implementation is
| treating the IP Address String as a list of bytes, so what I get
| in the trap is the ascii values of my String IP Address.
|
| Yes, this had been reported before, but the report was not
| specific enough for me to reproduce it here.  Interestingly, the
| bug seems to be variable, depending on the NMS software one uses
| to receive the trap.  Some receivers pick up the JoeSNMP string
| okay, and some don't.
|
| The fix is something like this, to replace the current line 257:
|
| code
| InetAddress tmpAddress = InetAddress.getByName(this.localIPAddress);
| addr.setString(tmpAddress.getAddress());
| /code
|
| This stuffs a properly filled byte array into the
| SnmpOctetString, and should do the trick without resorting to a
| roll-your-own parser.
|
| I'll release a fixed version of the appender in the next couple
| of days.  Thanks for the bug report!
|
| Cheers,
| Mark
|



*
Copyright ERA Technology Ltd. 2002. (www.era.co.uk). All rights reserved. 
The information supplied in this Commercial Communication should be treated
in confidence.
No liability whatsoever is accepted for any loss or damage 
suffered as a result of accessing this message or any attachments.


This email has been scanned for all viruses by the MessageLabs SkyScan
service. For more information on a proactive anti-virus service working
around the clock, around the globe, visit http://www.messagelabs.com


--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




RE: SnmpAppender extention suggestion (was: RE: Joe SNMP facade bug)

2002-10-15 Thread Thomas Muller

 and of course, remove the setSysupTime() etc. This is rarely used
anyway since one generally don't want to keep track of actual appenders and
specially not in form of their types (in this case SNMPAppender).

--

Thomas



| -Original Message-
| From: Thomas Muller [mailto:[EMAIL PROTECTED]]
| Sent: 15 October 2002 20:22
| To: Log4J Users List
| Subject: SnmpAppender extention suggestion (was: RE: Joe SNMP facade
| bug)
|
|
| Add interface:
|
| public abstract interface SysupTimeResolver {
| public abstract long getSysupTime();
| }
|
| Add the following to SNMPAppender:
|
| private static final SysupTimeResolver DEFAULT_SYSUP_TIME_RESOLVER =
| new SysupTimeResolver() {
|
| long time = System.currentTimeMillis();
|
| public long getSysupTime() {
| return( System.currentTimeMillis() - time );
| }
|
| };
|
| private SysupTimeResolver sysupTimeResolver = DEFAULT_SYSUP_TIME_RESOLVER;
|
| public void setSysupTimeResolverClass( String value ) {
| sysupTimeResolver = ( SysupTimeResolver )
| OptionConverter.instantiateByClassName( value,
| SysupTimeResolver.class,
| DEFAULT_SYSUP_TIME_RESOLVER );
| }
|
| --
|
| Thomas
|
| | -Original Message-
| | From: Mark Masterson [mailto:[EMAIL PROTECTED]]
| | Sent: 15 October 2002 19:59
| | To: Log4J Users List
| | Subject: RE: Joe SNMP facade bug
| |
| |
| | Hi Steve,
| |
| | Ahh, brilliant!
| |
| | the SnmpOctetString class in the JoeSnmp implementation is
| | treating the IP Address String as a list of bytes, so what I get
| | in the trap is the ascii values of my String IP Address.
| |
| | Yes, this had been reported before, but the report was not
| | specific enough for me to reproduce it here.  Interestingly, the
| | bug seems to be variable, depending on the NMS software one uses
| | to receive the trap.  Some receivers pick up the JoeSNMP string
| | okay, and some don't.
| |
| | The fix is something like this, to replace the current line 257:
| |
| | code
| | InetAddress tmpAddress = InetAddress.getByName(this.localIPAddress);
| | addr.setString(tmpAddress.getAddress());
| | /code
| |
| | This stuffs a properly filled byte array into the
| | SnmpOctetString, and should do the trick without resorting to a
| | roll-your-own parser.
| |
| | I'll release a fixed version of the appender in the next couple
| | of days.  Thanks for the bug report!
| |
| | Cheers,
| | Mark
| |
|
|
|
| *
| Copyright ERA Technology Ltd. 2002. (www.era.co.uk). All rights reserved.
| The information supplied in this Commercial Communication should
| be treated
| in confidence.
| No liability whatsoever is accepted for any loss or damage
| suffered as a result of accessing this message or any attachments.
|
| 
| This email has been scanned for all viruses by the MessageLabs SkyScan
| service. For more information on a proactive anti-virus service working
| around the clock, around the globe, visit http://www.messagelabs.com
| 
|
| --
| To unsubscribe, e-mail:
mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




*
Copyright ERA Technology Ltd. 2002. (www.era.co.uk). All rights reserved. 
The information supplied in this Commercial Communication should be treated
in confidence.
No liability whatsoever is accepted for any loss or damage 
suffered as a result of accessing this message or any attachments.


This email has been scanned for all viruses by the MessageLabs SkyScan
service. For more information on a proactive anti-virus service working
around the clock, around the globe, visit http://www.messagelabs.com


--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




RE: SnmpAppender extention suggestion

2002-10-15 Thread Mark Masterson

Hi Thomas,

That's purty!  :-)  I'll add it and list you as author/contributor.  I am reluctant to 
just kill the #setSysUpTime method/property, for backwards compatibility reasons, but 
I did deprecate it, and modify the appender to use the resolver's value whenever the 
sysUpTime property is not set.

Gracias!

Cheers,
Mark



SNMPAppender

2002-07-24 Thread Craig Smith

Has anyone written an SNMP appender?  I'd be interested in one.  If there isn't one 
available I might pick away at it.

Craig


Please Note
The information in this E-mail message is legally privileged
and confidential information intended only for the use of the
individual(s) named above. If you, the reader of this message,
are not the intended recipient, you are hereby notified that 
you should not further disseminate, distribute, or forward this
E-mail message. If you have received this E-mail in error,
please notify the sender. Thank you
*

--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




RE: SNMPAppender

2002-07-24 Thread Shapira, Yoav

Howdy,
I second the interest in that.  Check the contribs packages to see if
there's something close.

Yoav Shapira
Millennium ChemInformatics


-Original Message-
From: Craig Smith [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, July 24, 2002 9:12 AM
To: [EMAIL PROTECTED]
Subject: SNMPAppender

Has anyone written an SNMP appender?  I'd be interested in one.  If
there
isn't one available I might pick away at it.

Craig


   Please Note
The information in this E-mail message is legally privileged
and confidential information intended only for the use of the
individual(s) named above. If you, the reader of this message,
are not the intended recipient, you are hereby notified that
you should not further disseminate, distribute, or forward this
E-mail message. If you have received this E-mail in error,
please notify the sender. Thank you
*

--
To unsubscribe, e-mail:   mailto:log4j-user-
[EMAIL PROTECTED]
For additional commands, e-mail: mailto:log4j-user-
[EMAIL PROTECTED]


--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




RE: SNMPAppender

2002-07-24 Thread Ceki Gülcü


Did you see this?

http://www.m2technologies.net/asp/snmpTrapAppender.asp

At 09:13 24.07.2002 -0400, you wrote:
Howdy,
I second the interest in that.  Check the contribs packages to see if
there's something close.

Yoav Shapira
Millennium ChemInformatics


 -Original Message-
 From: Craig Smith [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, July 24, 2002 9:12 AM
 To: [EMAIL PROTECTED]
 Subject: SNMPAppender
 
 Has anyone written an SNMP appender?  I'd be interested in one.  If
there
 isn't one available I might pick away at it.
 
 Craig

--
Ceki

For complete log4j documentation please refer to http://qos.ch/log4jBook.html


--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




RE: SNMPAppender

2002-07-24 Thread FLYNN, Peter -Syntegra UK

I've been using it for a while.  Its pretty good.

Peter

 -Original Message-
 From: Ceki Gülcü [mailto:[EMAIL PROTECTED]]
 Sent: 24 July 2002 14:34
 To: Log4J Users List
 Subject: RE: SNMPAppender
 
 
 
 Did you see this?
 
 http://www.m2technologies.net/asp/snmpTrapAppender.asp




This email may contain information which is privileged or confidential. If you are not 
the intended recipient of this email, please notify the sender immediately and delete 
it without reading, copying, storing, forwarding or disclosing its contents to any 
other person
Thank you

Check us out at http://www.syntegra.com