This an an archived version of the documentation for SonarQube version 7.1.
See Documentation for current functionality
The SonarQube Server offers visibility about what happens internally through the exposure of JMX MBeans.
Exposed JMX MBeans
In addition to the classical Java MBeans providing information about the ClassLoader, OS, Memory and Threads you have access to four more MBeans in the SonarQube Server:
All these MBeans are read-only. It's not possible to modify or reset their values in real time.
Measure the time (in ms) spent to process Background Tasks since the last restart of SonarQube. Its value will always increase and will be reset by a restart of SonarQube.
This measure is very powerful when:
|ErrorCount||Number of Background Tasks which failed since the last restart of SonarQube|
|PendingCount||Number of Background Tasks waiting to be processed since the last restart of SonarQube|
|InProgressCount||Number of Background Tasks currently under processing. Its value is either 1 or 0, since SonarQube can process only one task at a time.|
Number of Background Tasks successfully processed since the last restart of SonarQube
|WorkerCount||Number of Background Tasks that can be processed at the same time|
- the total number of Background Tasks handled since the last restart of SonarQube is equal to SuccessCount + ErrorCount
- these values are reset to their default values by restarting SonarQube
Same attributes are available for both ComputeEngineServer and WebServer.
Possible values are: UP_TO_DATE, REQUIRES_UPGRADE, REQUIRES_DOWNGRADE, FRESH_INSTALL
(only available for WebServer).
|PoolActiveConnections||Number of active database connections|
|PoolIdleConnections||Number of database connections waiting to be used|
|PoolInitialSize||Initial size of the database connections pool.|
|PoolMaxActiveConnections||Maximum number of active database connections|
|PoolMaxIdleConnections||Maximum number of database connections waiting to be used|
|PoolRemoveAbandoned||Possible values : true, false|
|NumberOfNodes||Number of ES Nodes in your SonarQube installation.|
|State||Possible values are: GREEN, YELLOW, RED|
|LogLevel||Log Level: INFO, DEBUG, TRACE|
SonarQube Server ID
How to Activate JMX?
There is nothing to activate to view SonarQube MBeans if your tool is running on the same server as the SonarQube Server.
Here are examples of configuration to activate remote access to JMX MBeans.
For the WebServer:
For the SearchServer:
For the ComputeEngine:
There is no specific javaAdditionalOpts entry, simply amend the sonar.ce.javaOpts one.
Example of jmxremote.access:
Example of jmxremote.password:
Note: on jmxremote.password, you should apply
chmod 600 or
400 for security reasons.