With Public IP addresses now available in Jelastic, you can use JMX (Java Management Extension) tools to monitor your applications. It's pretty easy.
In this quick tutorial, we'll show you how to use JMX tools through the Java Monitoring and Management Console (JConsole) tool which provides information on performance and resource consumption of applications running on the Java platform using Java JMX technology.
What is JMX?
JMX lets you implement management interfaces for Java applications and control your applications remotely. It provides tools for managing and monitoring applications, system objects, devices, as well as service oriented networks. The dynamics of the JMX architecture enable you to use it for monitoring and controlling resources as they are implemented and installed.
Some of the main benefits that you get from using JMX are:
- Ability to manage Java applications and servers without heavy investment
- Scalable management architecture
- Ability to leverage future management concepts
Deploying JConsole
1. Go to Jelastic.com and sign up if you haven't done it yet or log in with your Jelastic credentials by clicking the Sign In link on the page.
2. While in Jelastic dashboard, click the Create environment button:
3. In the Environment Topology dialog, pick your application server (for example, Tomcat 6), switch on Public IPv4 for your server and type your environment name, for example, jmxtest.
Wait just a minute for your environment to be created. You can see your Public IP in the dropdown list for Tomcat.
4. Click on config button for Tomcat.
5. Navigate to variables.conf file (server directory) and set the following system properties:
-Dcom.sun.management.jmxremote
-Dcom.sun.management.jmxremote.port={your_port_number}
-Dcom.sun.management.jmxremote.ssl=false
-Dcom.sun.management.jmxremote.authenticate=false
-Djava.rmi.server.hostname={your_server's_public_ip}
Save the changes and restart Tomcat!
6. Run JConsole (.../jdk/bin/jconsole) on your computer and create a new remote connection (enter Tomcat's Public IP address and the port number that you have specified in variables.conf ).
Of course, you need a Java Virtual Machine installed on your computer to use JConsole.
You should see that the connection was successful: now you can monitor your server remotely.
Related articles
- How to deploy MeshCMS to Jelastic cloud (jelastic.com)
- How to deploy Hudson to Jelastic cloud (jelastic.com)
- How to deploy PrimeFaces applications into Jelastic cloud (jelastic.com)
- How to deploy Vaadin applications to Jelastic cloud (jelastic.com)