When using Performance Monitor, the task you want to perform can vary widely, depending on the kind of problem you've encountered and are trying to diagnose with the help of Performance Monitor. However, there are four tasks that you perform routinely as part of most diagnosis sessions using Performance Monitor:
Follow these steps to connect to a remote host system and add it under the Remote node in the Applications window:
Right-click the Remote node in the Applications window, and then choose Add Remote Host from the context menu that appears.
The Add Remote Host window is displayed.
In the Host Name box, enter the fully qualified host name or the IP address of the system to connect to. Then, click OK.
The Add Remote Host window closes, and the remote host appears under the Remote note in the Applications window.
Performance Monitor uses JMX connections to monitor GlassFish domains on remote host systems. Follow these steps to add a JMX connection to a remote host:
In the Applications window, navigate to and select the remote host to which you want to add a JMX connection.
Right-click the remote host, and then choose Add JMX Connection from the context menu that appears.
The Add JMX Connection window is displayed.
In the Connection box, add the JMX port number after the host name and colon. In default installations of GlassFish, the JMX port number is 8686.
Make sure the Use security credentials box is checked. Then enter the GlassFish administrator user name and password in the Username and Password boxes.
If TLS/SSL security has been set up on the JMX port of the GlassFish domain you are connecting to, check the Use TLS/SSL box.
The Add JMX Connection window closes, and the JMX connection appears under the remote host in the Applications window.
When GlassFish is installed, monitoring is off by default. Additionally, in many product deployments, GlassFish is often run with monitoring off. Thus, you sometimes need to turn monitoring on so that you can diagnose a problem with the help of Performance Monitor. In Performance Monitor, you turn monitoring on in one of two ways, depending on whether you want to monitor web services or other resources.
Setting Monitoring Levels for Web Services
In the Applications window, navigate to the GlassFish server instance hosting the web services you want to monitor.
Click the plus sign next to the GlassFish server instance to display its resources.
Right-click Web Services, and then choose Open from the context menu that appears.
The Web Services view opens in the views window.
In the table of web services, check the Monitoring Level setting of the web service you want to monitor. If the setting is OFF, choose LOW.
Monitoring is turned on for the web service.
Setting Monitoring Levels for Other Resources
In the Applications window, navigate to the GlassFish server instance hosting the resources you want to monitor.
Right-click the GlassFish server instance, and then choose Open from the context menu that appears.
The Server view opens in the views window.
In the list of monitors under Monitoring Configuration, click the OFF link next to any monitor you want to turn on.
Each time you click the OFF link for a monitor, the monitoring level is set to LOW and the resources handled by that monitor become available to Performance Monitor.
Follow these steps to display the view for a monitored item, and so see the graphs of performance metrics for the item:
In the Applications window, navigate to the item whose performance metrics you want to see.
Double-click the item.
The view for the item opens in the views window.