|
|
 |
To be able to use Java-monitor, you have to install a small probe in your application server.
The steps are as follows:
- Check prerequisites.
- Download the probe.
- Install the probe in your application server.
- Grab a coffee.
- Check the stats on Java-monitor.
- Set up SMS notifications.
We will detail each of these steps below.
|
| 1. Check Prerequisites |
|
The Java-monitor probe needs Java version 1.5 or newer to run. The
reason for this prerequisite is that the statistics that we are collecting simply
are not available in older versions of Java.
The current probe is designed to run in a JEE application server, such
as Tomcat, Jetty, JBoss, Glassfish or one of the many other application
servers. You cannot monitor plain Java applications (yet).
|
| 2. Download the Probe |
|
Please register and log in:
Excellent, you are logged in. All you have to do is click the probe download link.
Once downloaded, unzip the probe.
Java-monitor's probe comes as a WAR file, which you'll find in the zip you downloaded.
This WAR file is specific for your Java-monitor account. You can deploy it in
as many application servers as you like. Each application server will show up
separately on Java-monitor. You don't have to keep the probe around for later.
You can download it at any time.
|
| 3. Install the Probe in your Application Server |
|
The Java-monitor probe is a simple WAR file. It has no dependencies.
If you are familiar with deploying WAR files, you can simply use your
normal procedure and ignore the advise below.
- For Tomcat, unzip the downloaded file and copy java-monitor.war into the ${CATALINA_BASE}/webapps/ folder.
- For JBoss, unzip the downloaded file and copy java-monitor.war into the ${JBOSS_HOME}/server/default/deploy/ folder.
- For Glassfish, unzip the downloaded file and copy java-monitor.war into the ${GLASSFISH}/domains/domain1/autodeploy/ folder.
- For SpringSource dm Server, unzip the downloaded file and copy java-monitor.war into the ${SERVER_HOME}/pickup/ folder.
- For OC4J Standalone use the Enterprise Manger web interface. If you prefer to work on the command line, follow these instructions.
For all other JEE application servers simply use the procedure as discussed in your server's documentation.
If you use Jive Software's Openfire XMPP server, open the administrative console and install java-monitor-plugin.jar. Navigate to the plugins tab and choose "upload plugin". For Openfire, you do not need java-monitor.war and you can safely ignore it.
|
| 4. Grab a Coffee |
|
At this point, you'll have to wait a little while. The Java-monitor probe pushes
data every minute. It will be a few minutes before the graphs on Java-monitor are
useful or even interesting.
Why don't you make yourself a cup of coffee and sit back a bit. After all, you have
just set up monitoring in a matter of minutes and saved your employer hours of work.
Here is some reading to keep you entertained.
|
| Light Reading: Java-monitor Architecture |
|
Java-monitor is a centralised monitoring system for Java applications. Just as
Google offers centralised mail services, we offer centralised monitoring services.
You installed a probe in the JVM of your application server. The probe serves to
send statistics to Java-monitor. You can view these statistics from your web browser.
The image below shows this process.
On the left is your application server, running on a Java virtual machine.
You have just installed the Java-monitor probe in that server and it is transmitting
statistics as you read this.
The server stores the statistics. If you return to the Java-monitor forum, you'll
see these statistics and monitor your servers.
|
| Light Reading: Security Considerations |
|
Java-monitor does not have access to your application servers. There is no way
for Java-monitor to even contact your application server. It may be running
in-house, behind a firewall and maybe even NAT. Instead, the probe periodically
contacts the Java-monitor collector service to push data out to Java-monitor.
There are no facilities for the Java-monitor server to give commands to the
probe. All it does is receive data.
If you prefer to convince yourself, the complete source code of the Java-monitor
probe is included in the probe's WAR file. It is also available as the
java-monitor probes Google code project.
You can download the code there to review it. You can even to build your own,
custom probe if you like.
You are the only one who can see the data that flows to the Java-monitor server.
None of the other members has access to your statistics or your graphs. If you
like, you can choose to publish snapshots of graphs on the forum. Publishing a
snapshot only shows the data as you see it on the screen. No other graphs or
data is published unless you explicitly order Java-monitor to do so.
Each probe contains a limited key that gives it just enough access
to push data into your account. This key is not enough to log into the forum or
access your graphs and statistics. Please keep this key, and thus the probe,
private.
|
| 5. Check the Stats on Java-monitor |
|
Well, with your coffee finished, there should be something to look at on Java-monitor.
The panel below should now show your monitored hosts.
Alternately, go back to the forum and check out the server's statistics.
|
| 6. Set up SMS notifications |
|
Your servers are now being monitored.
Java-monitor will send you an e-mail notification if a server stops sending data for more than 2 minutes.
If you would like to receive these messages when you are on the road, you can configure a host to send its notification via SMS.
You can enter your telephone number in the forum's user control panel.
To specify which hosts should alert you via SMS, just open the details page of the host.
In the host configuration block you can enable SMS messages for that host.
If you have any questions about where your SMS credit went, or how many messages have been sent, you can see an SMS credit report in the forum's user control panel.
|
|
This panel shows the status of the Java application servers that you monitor on-line using Java-monitor.
At this time, you do not have any servers that are being monitored.
Once you have deployed the WAR file, as described above, it may take a few minutes for monitoring data to be collected.
|
| |
Name |
Memory and File Descriptors |
Thread and Database Pools |
| Common Problems and Solutions: Java Security Managers |
|
Java has an integrated security manager, which may have been enabled by your packager.
In some cases, the security manager may block the Java-monitor probe from working.
If that is the case, you will find exceptions such as the one below in your server's log files.
java.security.AccessControlException: access denied (java.util.PropertyPermission javamonitor.uniqueid read)
at java.security.AccessControlContext.checkPermission (Unknown Source)
at java.security.AccessController.checkPermission(Unknown Source)
at java.lang.SecurityManager.checkPermission(Unknown Source)
at java.lang.SecurityManager.checkPropertyAccess(Unknown Source)
at java.lang.System.getProperty(Unknown Source)
at com.javamonitor.JavaMonitorCollector.(JavaMonitorCollector.java:63)
...
In order to solve this, grant the Java-monitor probe access to your JVM's internals. Without such access, the probe cannot collect data from your JVM and Java-monitor cannot monitor your server.
Locate your security policy file and add the following lines to it:
grant codeBase "file:${catalina.base}/webapps/java-monitor/-" {
permission java.security.AllPermission;
};
Please notice that some repackaged Tomcat servers enable the security manager by default.
This is the case for example on Debian and Ubuntu Linux systems if you installed the apt-package for Tomcat instead of downloading a normal Tomcat from Apache.org.
To learn more about Java's security manager, check out Tomcat's Security Manager Howto, and Sun's documentation on Java policy files.
|
| Common Problems and Solutions: HTTP Proxies |
|
Java-monitor sends data out to the Java-monitor collector servers via HTTP.
If your application server cannot make a direct connection, but has to use an HTTP proxy, you have to configure your JVM to do so.
For example, to use a proxy named "proxy.example.com" on port 8080, add the following options to your VM arguments.
java -Dhttp.proxyHost=proxy.example.com -Dhttp.proxyPort=8080 -Dhttp.noProxyHosts="localhost|127.0.0.1" ...
For a Tomcat server on a UNIX machine you can use:
% JAVA_OPTS="${JAVA_OPTS} -Dhttp.proxyHost=proxy.example.com -Dhttp.proxyPort=8080 -Dhttp.noProxyHosts=localhost|127.0.0.1"
% export JAVA_OPTS
% bin/startup.sh
Java-monitor does not work with HTTP proxies that require authorisation.
|
Powered by vBulletin® Version 3.8.4 Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
vBulletin Skin developed by: vBStyles.com
|