Datadog Integreation with sonarqube

Hi Team,

Actually for one of My customer , we are using sonarqube enterprise version and we have setup the same and it is working as expected , And again we are even using Datadog as Enterprise monitoring solution. Now the requirement is that we want to monitor sonarqube details in Datadog , Can you please let me what steps needed from sonarqube properties , As I have heard that there is a JMX setyp which we need to do , But there is no proper documentation regarding this . Can you please guide us what chnages I need to do to monitor sonarqube with Datadog

2 Likes

I have the exact same problem. It would reply help if this post could get an answer!

Hi @nanaasiedu ,

Actually After working on this and based on my inputs regarding this issue , Datadog has updated their official documentation regarding this setup and you can have a look at the below url regarding the same

Please feel free to each me if you stuck at any where , as of now i have fixed this and its working too

Thanks for quick response @vinodkumar4b9 !
great so I’m trying to activate JMX on my sonarqube instance but it is unclear to me where to add the configurations specified in the documentation : https://docs.sonarqube.org/latest/instance-administration/monitoring

Where did you put them?

Hi @nanaasiedu ,

You need to add the below lines in sonar.properties file in sonarqube/conf folder

 JMX WEB - 10443/10444
sonar.web.javaAdditionalOpts=-Dcom.sun.management.jmxremote=true -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=true -Dcom.sun.management.jmxremote.port=10443 -Dcom.sun.management.jmxremote.rmi.port=10444 -Dcom.sun.management.jmxremote.password.file=/opt/sonarsource/sonar/conf/jmxremote.password -Dcom.sun.management.jmxremote.access.file=/opt/sonarsource/sonar/conf/jmxremote.access
1 Like

Great ive done that

What about for the JMX Access Control and Password file configs?

#
# JMX Access Control file
#
reader readonly
admin  readwrite \
    create javax.management.monitor.*,javax.management.timer.*,com.sun.management.*,com.oracle.jrockit.* \
    unregister
#
# JMX Access Password file
#
reader readerpassword
admin  adminpassword

Yes , you need to create them and make sure you create user with which sonarqube is running and give required permissions and restart sonarqube service , If service is not coming up your configuration is wrong

1 Like

Great will try that thank you!

Np which sonarqube you are using , developer or enterprise version ??

I’m playing around with a local instances first using the developer version but my company has an enterprise instance running

Does that effect how it’s configured?

Nope , I don’t think so It will effect , Please go ahead

In the Datadog documentation, it refers to JMX instance username and password to be defined in the sonar.properties. How are those defined in the sonar.properties file? And how do you securely add them in the integration conf.yaml file?

As well as for the Web API instance config, I assume the username/password is for any user account?