Yes, there is already an SNMPTrapAppender for Log4J. Check out http://www.m2technologies.net/html/doc/org/apache/log4j/ext/package-summary.html
This code uses either Wengsoft SNMP or JoeSNMP libraries to send SNMP traps. I just used it in my last project. It sends SNMP v1 traps just fine, although we never got SNMPv2c traps working properly, at least not with IBM Netview as the recipient. As far as estimating times on a project goes, if you can use Log4J to write to a file now, it's a piece of cake getting SNMPTrapAppender working. Get the plumbing right (files in the right places, proper log4j.xml file) and it just works, as long as you're okay with SNMP v1 traps, or sending SNMPv2c to something other than IBM Netview. Rgds, Bret > -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] > Sent: Thursday, October 28, 2004 4:44 AM > To: Log4J Users List > Subject: SNMP Appender > > > > > > Hi all, > > my task is to send log information at level ERROR or higher > as SNMP trap to a SNMP manager application. > As I have absolutely no experience in connecting from java to > SNMP, I would be thankful for information about that. > > Has anyone experience about this topic, may be is there > already an SNMP Appender available for log4j. > > It would even help me, if anyone can tell me, if it is hard > work to access to SNMP or if it is well supported by some > java librarys (for me to estimate the effort) > > Thanks a lot in advance > > Herb > > -- > Diese E-Mail enth�lt vertrauliche und/oder rechtlich > gesch�tzte Informationen. Wenn Sie nicht der richtige > Adressat sind oder diese E-Mail irrt�mlich erhalten haben, > informieren Sie bitte sofort den Absender und vernichten Sie > diese E-Mail. Das unerlaubte Kopieren sowie die unbefugte > Weitergabe dieser Mail oder von Teilen dieser Mail ist nicht > gestattet. > > Wir haben alle verkehrs�blichen Ma�nahmen unternommen, um das > Risiko der Verbreitung virenbefallener Software oder E-Mails > zu minimieren, dennoch raten wir Ihnen, Ihre eigenen > Virenkontrollen auf alle Anh�nge an dieser Nachricht > durchzuf�hren. Wir schlie�en au�er f�r den Fall von Vorsatz > oder grober Fahrl�ssigkeit die Haftung f�r jeglichen Verlust > oder Sch�den durch virenbefallene Software oder E-Mails aus. > > Jede von der Bank versendete E-Mail ist sorgf�ltig erstellt > worden, dennoch schlie�en wir die rechtliche Verbindlichkeit > aus; sie kann nicht zu einer irgendwie gearteten > Verpflichtung zu Lasten der Bank ausgelegt werden. > ______________________________________________________________________ > > This e-mail may contain confidential and/or privileged > information. If you are not the intended recipient (or have > received this e-mail in error) please notify the sender > immediately and destroy this e-mail. Any unauthorised > copying, disclosure or distribution of the material in this > e-mail or of parts hereof is strictly forbidden. > > We have taken precautions to minimize the risk of > transmitting software viruses but nevertheless advise you to > carry out your own virus checks on any attachment of this > message. We accept no liability for loss or damage caused by > software viruses except in case of gross negligence or > willful behaviour. > > Any e-mail messages from the Bank are sent in good faith, but > shall not be binding or construed as constituting any kind of > obligation on the part of the Bank. > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
