Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Java Exception monitoring

This is more of a question if such a piece of software exists: The problem right now in our applications is if there is a gack we mail it out. This quickly turns bad if there is a really bad problem that just spams our email over night or something.

Is there a tool that maybe populates these errors in some sort of database that we can query against (by different components) and build a nice little monitoring site of all the exceptions that get thrown by each component?

I've been searching around and found nothing of the sort, right now I'm looking into just log file monitoring since there seem to be a bunch of tools around that existing.

Thanks

like image 839
Th3sandm4n Avatar asked Aug 05 '11 16:08

Th3sandm4n


People also ask

How do you handle exceptions in Java?

The try-catch is the simplest method of handling exceptions. Put the code you want to run in the try block, and any Java exceptions that the code throws are caught by one or more catch blocks. This method will catch any type of Java exceptions that get thrown. This is the simplest mechanism for handling exceptions.

Which keyword is used to monitor exceptions Java?

Explanation: Exception handling is managed via 5 keywords – try, catch, throws, throw and finally.

Which key is used for monitor for exceptions?

Explanation: Exceptional handling is managed via 5 keywords – try, catch, throws, throw and finally. 3. Which of these keywords must be used to monitor for exceptions? Explanation: None.


5 Answers

If you are using log4j for logging, it has an option for logging required information to different destinations, including database tables.

Log4j also has a component called chainsaw, which could help you with the monitoring aspect. You may need to explore these two to help fit into your requirement.

-RR

like image 196
rishi Avatar answered Sep 30 '22 14:09

rishi


I think you would love to know that there is a team out to solve just the same problem in the most beautiful fashion.

https://www.takipi.com/

How it works

Takipi supports all JVM-based languages, and does not require code changes or build configurations to use. From : https://www.takipi.com/how-it-works

To begin, install the Takipi daemon process on the target machine. You can then monitor a target application by adding a standard -agentlib parameter to its list of JVM arguments. The agent library detects all caught and uncaught exceptions, HTTP and log errors from the JVM, without needing to access log files.

like image 32
Ajeet Ganga Avatar answered Oct 02 '22 14:10

Ajeet Ganga


I would prefer errbit. It is the open source alternative to airbrake. It comes from the rails world, but with a log4j appender you can easily connect it to a java world. It clusters error cases, support environment informations, supports various error tracker and send emails.

like image 21
thilko Avatar answered Sep 29 '22 14:09

thilko


Have a look at Ctrlflow Automated Error Reporting. It is optimized for Java and comes with several logging integrations, which send error reports home to a central server.

If you are developing in Eclipse you may already have seen it in action, as Eclipse uses this service to report and track its errors.

The server then automatically filters and aggregates the incoming error reports. If you get the same error multiple times, the server detects that and groups all error reports into a single problem, so you don't have to checkout each individual report. These problems are then assigned to their correct component or project.

The server synchronizes itself with your bug tracker and can automatically open new bugs. It also offers dashboards and digest mails sent at regular intervals to your developers.

And its free for small projects. Note that I am one of its developers.

like image 28
Johannes Dorn Avatar answered Oct 01 '22 14:10

Johannes Dorn


You can also find this tool JSnapshot useful to monitor exceptions in Java application in real time. JSnapshot is an advanced java exception logging, monitoring and analysis tool. It traces thrown exceptions in real-time and logs a snapshot of call stack, variables and objects for every thrown exception. With this tool, you can examine all of the exception details as if the application was stopped at the breakpoint in the debugger when exception happened. And it's integrated with Eclipse IDE.

like image 37
JSnapshot Team Avatar answered Oct 02 '22 14:10

JSnapshot Team