Sonar monitoring data are inconsistent

When using GitHub - prometheus/jmx_exporter: A process for exposing JMX Beans via HTTP for Prometheus consumption to collect and export Sonar Monitoring information into Prometheus, the SonarQube:name=ComputeEngineTasks bean is ignored.

The root cause seems to be the fact that LongestTimePending returns a java.util.Optional that is not serializable.

Is it possible to change the return type of this attribute ?

  • versions used : 8.9.1

  • error observed

Welcome to JMX terminal. Type "help" for available commands.
$>open -u reader -p xxxx sonar-jmx:10445
#Connection to sonar-jmx:10445 is opened
$>bean SonarQube:name=ComputeEngineTasks
#bean is set to SonarQube:name=ComputeEngineTasks
$>get LongestTimePending
#mbean = SonarQube:name=ComputeEngineTasks:
#RuntimeIOException: Runtime IO exception: error unmarshalling return; nested exception is: writing aborted; java.util.Optional
  • steps to reproduce : set-up JMX following Monitoring | SonarQube Docs and access LongestTimePending attribute from SonarQube:name=ComputeEngineTasks with JMXTerm.

Hey there.

Thanks for the feedback. This was addressed by SONAR-15057 in SnoarQube v9.0.

1 Like


Thank you : so we will plan to upgrade to 9.0 :wink:

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.