Glassfish Monitoring with VisualVM

For monitoring Glassfish performance i use VisualVM. I have visual installed on my laptop and the connects using jmx to my glassfish servers to get server stats.

This is only to get the current data and to se how mutch memory my apps are using and so on.


1. Download and start VisualVM

Go here and download VisualVM
Install visual on you local computer.


2. Set up Glassfish for reciving JMX connections from external ip

On your glassfish you need to add som jvm values so in your server-config –> jvm-settings –> JVM options add the following.
-Djava.rmi.server.hostname= <--- IP of you server

Now restart you glassfish.
And enabel secure-admin and set admin password.
Se my post on installing Glassfish for how


3. Setup VisualVm to get data from Glassfish

Add a new remote host, then add new JMX connection and add the ip and port(8686) to the settings and connect.

Now you should see monitroing data from you glassfish.