Sonarqube metric retention policy settings

Must-share information (formatted with Markdown):

  • which versions are you using (SonarQube, Scanner, Plugin, and any relevant extension)
    Community Edition Version 8.9.6 (build 50800)

  • what are you trying to achieve
    How can we set the sonarqube metrics retention policy using a properties file other than setting it through the console?

Hey there.

What settings are you talking about specifically?

Hi Colin,
As I mentioned, I want to setup a metric retention policy so that I can store it for the duration longer than the 1 month which is the setting by default I guess.

Maybe a screenshot would help demonstrate the setting you’re discussing.

As far as the screenshot is concerned I cannot share anything as I do not have an issue.
It is just that I want to store logs longer than its default settings and I found below link to do it per project:

I want to have it done using some property file or something.
The idea is to have a settings configuration which then could be easily applied and not doing the settings manually through the console.

Thanks for clarifying that this has to do with Audit logs.

It’s not possible to set this outside of the SonarQube Web UI.

Hi Colin
I believe every Sonarqube project has a property file named
So can you tell me or share a resource/url to understand what are the settings that is possible through it as I was hoping to use this property file to increase the audit log retention period.

Retention for audit logs is a global (SonarQube-instance level) setting, so a file wouldn’t be relevant here. Such a file is relevant only for analysis parameters.

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