Watermark sonarqube

Hello how are you?

Currently, I am using two versions of SonarQube:

Development environment: Community Edition Version 9.1 (build 47736)
Production environment: Developer Edition Version 9.9.1 (build 69595)
In both cases, I need to modify the SonarQube watermark. By default, these values are set to around 85-90% of the disk size, but I need to reduce the disk space even more without affecting the performance of the Sonar analysis.

To achieve this, I have performed tests that involve editing the elasticsearch.yml file and the properties.sonar file, as well as disabling the threshold_enabled option. For example:

In the sonar.properties file:

yaml
Copy code
cluster.routing.allocation.disk.threshold_enabled: false
cluster.routing.allocation.disk.watermark.low: 5%
cluster.routing.allocation.disk.watermark.high: 5%
cluster.routing.allocation.disk.watermark.flood_stage: 10%

Is there a possibility to modify the elasticsearch.yml file for SonarQube?

I thank you in advance for your attention and I hope I have clearly explained my query.

Kind regards.

Welcome to the community.

I would say SonarQube has own sonar.properties.
However, you can try to set directly in ES SQ instance. Check this

You do not need to fully disable, you can try to set temp values as transient.

PUT _cluster/settings
{
  "transient": {
    "cluster.routing.allocation.disk.watermark.low": "100gb",
    "cluster.routing.allocation.disk.watermark.high": "50gb",
    "cluster.routing.allocation.disk.watermark.flood_stage": "10gb",
    "cluster.info.update.interval": "1m"
  }
}

Clean unused docs from indices to get more space, and return to the standard watermark values.

Good evening,

Thank you very much for your response. I tried what the post suggests. I also posted the same question on the SonarQube forum, but they mentioned that it is not possible to disable the watermark. That's why I would like to be able to edit these parameters and set them to the minimum levels if possible.

Thank you again for your response.

It's not possible directly but try a workaround. This question was for SQ, however we can provide a suggestion.

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