Monitoring Jetty with Java-monitor
This page shows you step-by-step how to monitor your Jetty server using Java-monitor.
You can read more on http://java-monitor.com/install.html, which is a generic discussion of the tutorial provided below.
Java-monitor only works if you run Jetty on Java 5 or newer.
Java 5 introduced a very useful set of JMX MBeans for monitoring the JVM. Java-monitor builds on these. JMX was available in older version of Java, but unfortunately the useful MBeans are not available. For this reason, Java-monitor does not support older JVM's. We cannot monitor garbage collector activity in older Java VM's.
Java-monitor relies on JMX to gather statistics from your Jetty instance. See Running jetty with jconsole for instructions on how to turn on jmx when starting up your server instance.
If you don't have a Java-monitor account, visit http://java-monitor.com/forum/register.php to sign up.
Java-monitor is an on-line monitoring service. The statistics are collected centrally, by Java-monitor's servers. You will need the account to log into Java-monitor and see your gathered data.
Please take a moment to consider what e-mail address you will be registering with. The e-mail that you used for registering the account will receive the notification e-mails in case a server goes off-line.
Please note that if your employer imposes strict data retention regulations, you may be barred from using Java-monitor. Most large multinationals do not allow production servers to send even relatively uninteresting data, such as memory statistics, out onto the Internet.
This centralised approach may seem a little awkward at first, but you'll see why we work like that when you are out of the road and you have to explain a server outage. Java-monitor allows you to access the statistics from your iPhone or Android phone, even when your Jetty server has gone off-line. Restarting no longer erases all evidence of the problem, and you can still see the graphs from before the restart.
Don't worry about who can and cannot see your data. You are the only one who can see the data from your hosts. Each Java-monitor user only sees his or her own hosts.
Once you are registered and logged in, download your personalised probe. http://java-monitor.com/lemongrass/java-monitor-probe.zip
This probe is generated for each account individually, so don't share it with your co-workers.
Unzip the downloaded ZIP file with your favourite unzipper. Inside, you will find a file named java-monitor.war. This file is the actual probe. As you can see, Java-monitor's probe is pretty small, just under 100k.
Deploy the probe in your Jetty server. It is just a regular WAR file. You can deploy it just like you are used to. More information can be found in Web Application Deployer (static deploy) and Context Deployer (hot deploy!).
Once the probe is deployed, check your Jetty logs for error messages. If there are none, go to the Java-monitor forum home page to see the gathered statistics and the latest discussion.
That's it. You will automatically receive e-mail notifications for hosts that go off-line.
If you like, you can also enable SMS notifications for your production machines.
In case there is a problem that you would like us to explain just ask on the forum. You'll find a link under each graph to make it easy to post that graph in a forum. Go ahead and try it. We have a /dev/null forum just for that purpose.
We look forward to meeting you on the forum.