# Watermark sonarqube

**URL:** https://discuss.elastic.co/t/watermark-sonarqube/350406
**Category:** Elasticsearch
**Created:** [January 4, 2024, 6:30pm UTC](https://discuss.elastic.co/t/watermark-sonarqube/350406 "2024-01-04T18:30:29Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![walterh91](https://avatars.discourse-cdn.com/v4/letter/w/8baadc/32.png) [@walterh91](https://discuss.elastic.co/u/walterh91)
#### Post date: [January 4, 2024, 6:30pm UTC](https://discuss.elastic.co/t/watermark-sonarqube/350406/1 "2024-01-04T18:30:29Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![Rios](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rios/32/95745_2.png) [@Rios](https://discuss.elastic.co/u/Rios)
#### Post date: [January 4, 2024, 7:05pm UTC](https://discuss.elastic.co/t/watermark-sonarqube/350406/2 "2024-01-04T19:05:01Z")

</div>

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](https://github.com/vanderby/SonarQube-AzureAppService/issues/40#issuecomment-624515662)

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

```auto
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.

---

<div class="post-metadata">

### Author: ![walterh91](https://avatars.discourse-cdn.com/v4/letter/w/8baadc/32.png) [@walterh91](https://discuss.elastic.co/u/walterh91)
#### Post date: [January 5, 2024, 1:17am UTC](https://discuss.elastic.co/t/watermark-sonarqube/350406/3 "2024-01-05T01:17:25Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![Rios](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rios/32/95745_2.png) [@Rios](https://discuss.elastic.co/u/Rios)
#### Post date: [January 5, 2024, 7:17am UTC](https://discuss.elastic.co/t/watermark-sonarqube/350406/4 "2024-01-05T07:17:18Z")

</div>

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

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)
#### Post date: [February 2, 2024, 7:17am UTC](https://discuss.elastic.co/t/watermark-sonarqube/350406/5 "2024-02-02T07:17:41Z")

</div>

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