Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

SNMP & JAVA

Posted on 2005-03-24
5
Medium Priority
?
4,687 Views
Last Modified: 2008-01-09
Hi,

I have several java applivation working in the network and am now looking for a good maintenance method to it.
I thought of using SNMP to be independent. As i am new to SNMP i might have some conceptional erros, that' s why i am asking if my idea sounds good....

I decided on SNMP as all mangement tools i know support this (e.g. HP, MON,...)

As far as I know SNMP supports two kinds of logging.

SNMP Trap means sending unasked information in the network? Of course there should be a snmp service collecting it...
and

interaction with program to get status and logging information or recieve events.

As all my java apps use java.util.logging
I thought of implementing a new LogHandler who does nothing then piping the java.util.logger. messages to the SNMP Server via SNMP so a SNMPHandler for java.util.logging

Additional I wanted to add the functionality to this loghandler to filter all logmessages for predefined keywords. and upon occurence of one of those fire an event for the SNMP Management. As I have limited all Logmessages to special ErrorCodes this will mean no change to the code of any of my apps.

for this task i found two open source libs:
http://edge.mcs.drexel.edu/GICL/people/sevy/snmp
and
http://www.snmp4j.org

second seems to be the better.

Can anyone help me fullfilling my task (implementing a SnmpLogHandler) with the following fetaures:
1.) dump logmessages to snmp Management
2.) fire events to snmp Management

All hints and explanation and of course code snippets are welcome

thanks
0
Comment
Question by:mightyone
  • 3
5 Comments
 
LVL 6

Author Comment

by:mightyone
ID: 13621019
another idea would be to set up a new JavaBased Server witch accepts continious logging from the java apps by configuring the logging to be of type java.util.logging.SocketHandler but then same problem with the snmp connection..
0
 
LVL 2

Assisted Solution

by:ucool
ucool earned 400 total points
ID: 13621950
By the way, to manage Java applications, you can use JMX. More info can be seen from: http://java.sun.com/products/JavaManagement/
0
 
LVL 15

Accepted Solution

by:
aozarov earned 1600 total points
ID: 13623428
>> I thought of implementing a new LogHandler who does nothing then piping the java.util.logger. messages to the SNMP Server via SNMP so a SNMPHandler for java.util.logging
You can use this known appender for that: http://www.m2technologies.net/asp/snmpTrapAppender.asp
This appender will send Traps to an NMS based on your log4j messages.

I recommend using www.sf.net/projects/joesnmp which is an easy to use LGPL Java based snmp stack for any other snmp requirements: like collecting data from agents.
BTW, the above appender is using joesnmp as well.

I agree with ucool that JMX with an rmi connector (or similar) can provide the means to manage Java applications remotely.
0
 
LVL 6

Author Comment

by:mightyone
ID: 13624038
Thanks so far will start checking your hints after easter.....

happy easter folks!
0
 
LVL 6

Author Comment

by:mightyone
ID: 13650086
Wow that is what I was looking for,

thanks !
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

After being asked a question last year, I went into one of my moods where I did some research and code just for the fun and learning of it all.  Subsequently, from this journey, I put together this article on "Range Searching Using Visual Basic.NET …
Java contains several comparison operators (e.g., <, <=, >, >=, ==, !=) that allow you to compare primitive values. However, these operators cannot be used to compare the contents of objects. Interface Comparable is used to allow objects of a cl…
Viewers will learn one way to get user input in Java. Introduce the Scanner object: Declare the variable that stores the user input: An example prompting the user for input: Methods you need to invoke in order to properly get  user input:
Viewers will learn about the regular for loop in Java and how to use it. Definition: Break the for loop down into 3 parts: Syntax when using for loops: Example using a for loop:
Suggested Courses
Course of the Month15 days, 13 hours left to enroll

581 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question