Live Monitoring Using the JMX Interface
JMX (Java Management Extensions API) allows you to monitor the status of your Confluence instance in real time. JMX uses objects called MBeans (Managed Beans) to expose data and resources from your application, providing useful data such as the resource usage of your instance and its database latency, allowing you to diagnose problems or performance issues.
In this page we'll guide you through how to use JConsole to monitor Confluence locally and remotely. JConsole is included in the Java Development Kit (JDK), but you can use any JMX client.
This guide provides a basic introduction to the JMX interface and is provided as is. Our support team can help you troubleshoot a specific Confluence problem, but aren't able to help you set up your monitoring system or interpret the results.
Write JMX metrics to a log file
You can also choose to write the following JMX metrics to a log file. This is useful when you are troubleshooting a problem.
To write JMX metrics to a log file:
- Go to > Scheduled jobs > General Configuration
- Enable the Log JMX Metrics job.
This job runs once per minute by default, and writes metrics to the
Monitor Confluence locally using JConsole
If you are troubleshooting a particular issue, or only need to monitor Confluence for a short time, you can use local monitoring. Local monitoring can have a performance impact on your server, so its not recommended for long term monitoring of your production system.
To monitor locally:
Start JConsole (you'll find it in the
bindirectory of the JDK installation directory)
- Select Local Process.
Select the Confluence process. It will be called something like
See Using JConsole for more information on local monitoring.
Monitor Confluence remotely using JConsole
Remote monitoring is recommended for production systems, as it does not consume resources on your Confluence server.
To monitor remotely:
Add the following properties to your
setenv.batfile. The port can be any port that is not in use.
set CATALINA_OPTS=-Dcom.sun.management.jmxremote %CATALINA_OPTS% set CATALINA_OPTS=-Dcom.sun.management.jmxremote.port=8099 %CATALINA_OPTS%
Decide how you will secure your remote connection. See Remote Monitoring and Management for more information.
Although it is possible to disable authentication, we do not recommend doing this on a production system.
- Start JConsole (you'll find it in the
bindirectory of the JDK installation directory).
- Select Remote Process.
- Enter your hostname and port (this is the port you specified earlier, not the Confluence port).
- Click Connect.
See Using JConsole for more information on remote monitoring.
You can use the following Confluence MBeans to see live information about your Confluence instance.
This MBean shows information about Confluence caches. This info can also be found on the Cache Statistics page.
This MBean shows information related to search indexing. Here's some useful attributes.
Indicate whether the cache is currently flushing
Time taken during last indexing
Shows number of tasks in the queue
|ReIndexing||Indicates whether Confluence is currently reindexing||True/False|
This MBean shows information such as the Confluence version and uptime. This info can also be found on the System Information page.
Shows the latency of an example query performed against the database
This MBean shows information related to system load and error pages served.
Average execution time for the last ten requests.
Number of requests being served at this instant.
Number of times the Confluence error page was served.
The number of requests in the last ten seconds.
This MBean shows information related to email dispatch attempts and failures. There will be an MBean for every SMTP Mailserver that has been configured in the Confluence instance.
The number of email messages Confluence has tried to send.
The number of email messages sent successfully.
This MBean shows information related to the email workload.
Number of errors in the queue.
Shows state (i.e. flushing, or not)
Time that operation began.
The number of retries that were performed.
Number of email messages queued for dispatch.
This MBean shows information related to current jobs, scheduled tasks and the time that they were last run.
|AllJobNames||Shows information on current scheduled jobs including the time they were last run||String|
|CurrentlyRunningJobNames||Lists the scheduled jobs that are currently running||List|
To also monitor Hibernate and Hazelcast (Confluence Data Center only) you will need to add the following properties to your
setenv.bat file first.
set CATALINA_OPTS=-Dconfluence.hazelcast.jmx.enable=true %CATALINA_OPTS% set CATALINA_OPTS=-Dconfluence.hibernate.jmx.enable=true %CATALINA_OPTS%
This will make the Hibernate and Hazelcast MBeans available in your JMX client.
Monitoring high CPU consuming threads
The Top Threads Plugin for JConsole is useful for monitoring whether the CPU is spiking. Use the following command to start JConsole with this plugin:
JConsole -pluginpath /pathto/topthreads.jar
Was this helpful?Yes Provide feedback about this article