Everything about Web and Network Monitoring

How to monitor your Java application logs

To drive business ROI and retain competitive advantage in today’s super-fast paced digital market, organizations have to focus on their applications. Applications are the life-blood of a business; they are the channels through which end-users engage with your brand, products, and services.

Many application servers generate log files in such areas as local files, log4j, log4net, Weblogic, WebSphere, JBoss, .NET, and PHP. All of this IT data provides critical insights into application and application server operation and performance, but also can lead to information on user activity and provide fraud detection. These log files provide an important set of metrics for monitoring your infrastructure when something goes awry. At the same time, the challenge with log files is that there are a “lots” of them and they generate a lot of noise, which can make it difficult to zero in on the exact issues you’re facing.


Java has long been one of the most ubiquitous programming languages out there, and is used as the backbone for many enterprise applications and online businesses. It’s therefore important to be able to track and detect performance bottlenecks and monitor your Java application – such as Java heap memory, threads, and metrics specific to your app – all in real-time in order to detect issues that may impact your customers before they do.

Let’s walk through some “how-tos” on monitoring your Java application logs.

1. Get familiar with Apache Log4j

One of the most powerful Java log engines on the market is Log4J. It’s an open source project now maintained by the Apache Software Foundation. Apache Log4j 2 is the latest upgrade to Log4j.

Paid Monitor has contributed some really helpful articles over the past several years that include plenty of documentation on integrating Log4j into Paid Monitor – so you get the best of both worlds in Java logs monitoring and cloud-based, real-time website monitoring.

Here’s a summary of the methods and approaches adopted in these articles:

Paid Monitor+Log4j: The Cure for Monitoring Java Logs

This is a great tutorial written four years ago by the founder of Paid Monitor with the aim of building a Paid Monitor Custom monitor that can provide real-time monitoring for Java applications logs. The author maps out the following schema needed to build this system with both Log4J SocketAppender and Paid Monitor Custom Monitoring features.




The source code for implementing this architecture and its necessary details can be found in the GitHub repository here.

Monitor your Java application logs in 4 easy steps

In this article the writer shares a simple and easy solution to turn IT logs into useful graphs, in real time. The approach is based on the use of four key tools that he integrates together: Log4J, Logstash (data pipeline & aggregator), StatsD (originally a simple aggregator and summary tool for application metrics, which is now part of DataDog), and Paid Monitor. The writer has this caveat to share, “With so many moving parts, you might be tempted to think this could be an overcomplicated solution. But in fact — as in the long tradition of Unix command line tools — it is a composition of simple tools each doing one job very well. As with files piped from one Unix command to another, these four components act as a pipeline for log events, with each piece adding value to the stream along the way.”

The article is otherwise a very useful tutorial on how to build a fully integrated application log monitoring pipeline from some of the best tools out there, including Paid Monitor.




Log-alize Java: Monitoring Java Application Logs

Written on the heels of the second article above, this third blog shares a more stream-lined approach to monitoring Java application logs. The proposal presented here is to create a generic custom appender with filtering that receives information from Log4J, filters it according to a user pattern (RegExp), and then sends it to Paid Monitor using the Paid Monitor Open API. The writer distills the process down into two simple main steps:

* include the log_mon.jar (generic custom appender) in your list of application libraries

* Using the settings shown below as an example, modify your Log4J configuration file to specify the settings for the Paid Monitor Appender

In many ways this last article represents a simplification of the two earlier approaches.

2. Just use Paid Monitor Java/JMX monitoring!

A lot has happened in the 3 to 4 short years since the preceding articles were written, and Paid Monitor has been busy building newer and easier ways to monitor your Java application logs.




Paid Monitor now provides a simple to install Java/JMX monitoring tool that gives you first hand optics on your whole Java environment. Some of the key features you get here are: frequent health checks on the status of your entire Java application, means to improve code quality, and system stability and performance. Easy to follow instructions for downloading the Java/JMX agent are described here.

Paid Monitor is an industry leading 24/7 cloud-based, monitoring service that provides customers with a clear and intuitive dashboard that lets them see whatever they want in their IT world in a glance. Whether it be Web apps, servers, applications, networks, websites and more, it is all covered in the various monitoring tools that Paid Monitor provides. The benefits and takeaways here are peace of mind and less stress. Knowing about the issues before they strike means you can be proactive rather than reactive. This is good for you and your business, and ultimately leads to better performance and happier customers.




If you’d like to get onboard with the latest in real time and cloud-based website monitoring, then go on over to Paid Monitor today and start a free trial. Let them “keep an eagle eye” on all your Java applications so you can enjoy life and focus on the things that really matter.

Post Tagged with

About Jeffrey Walker

Jeff is a business development consultant who specializes in helping businesses grow through technology innovations and solutions. He holds multiple master’s degrees from institutions such as Andrews University and Columbia University, and leverages this background towards empowering people in today’s digital world. He currently works as a research specialist for a Fortune 100 firm in Boston. When not writing on the latest technology trends, Jeff runs a robotics startup called virtupresence.com, along with oversight and leadership of startuplabs.co - an emerging market assistance company that helps businesses grow through innovation.