# SonarQube Server Integration

Delivering **high-quality software** requires continuous attention to **code reliability, security, and maintainability**. By integrating [**SonarQube Server**](https://www.sonarsource.com/) with [**Oobeya**](https://oobeya.io), your teams gain end-to-end visibility into code quality, technical debt, and maintainability trends — all in one place.

***

### 1. Generate a SonarQube Server User Token&#x20;

A **User Token** allows Oobeya to connect to your SonarQube Server instance and retrieve project data securely.

{% hint style="info" %}
The token creation process has been updated.\
For the official reference, see: [Generating and Using Tokens](https://docs.sonarsource.com/sonarqube-server/user-guide/managing-tokens)
{% endhint %}

#### Steps:

1. Log in to your **SonarQube Server** instance.
2. Click your **user avatar** (top-right corner) → select **My Account** → open the **Security** tab.
3. Under **Generate Tokens**, enter a **token name** (e.g., `oobeya-integration`).
4. Select **"User Token"** as token type.
5. Click **Generate**.
6. Copy and **store the token securely** — it’s shown only once.

{% hint style="info" %}
The token should belong to a user with at least **Browse** access to all relevant projects. For organization-wide visibility, use a user account with **Admin** permissions.
{% endhint %}

<figure><img src="https://3582076375-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MGIlBSTjQtZxUoFwUx4%2Fuploads%2FSRZyeeJAQqMSDZGkNaHa%2Fimage.png?alt=media&#x26;token=c1c9bb67-857e-48b6-80c5-21765cf94405" alt=""><figcaption><p>Generating a new user token</p></figcaption></figure>

***

### 2. Install the SonarQube Add-on in Oobeya

1. Log in to Oobeya with an **Administrator** account.
2. Navigate to **Integrations.**
3. Locate **SonarQube Server** and click **Install**.

<figure><img src="https://3582076375-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MGIlBSTjQtZxUoFwUx4%2Fuploads%2FryTDLzDH5jJgMxJKwDAk%2Fimage.png?alt=media&#x26;token=d0874e29-2563-4173-8a1e-db01d1318e89" alt="SonarQube Integration"><figcaption><p>SonarQube Server Integration</p></figcaption></figure>

Once installed, the SonarQube Server connector becomes available in your **Data Sources** list.

***

### 3. Add a SonarQube Data Source

1. Go to **Data Sources → SonarQube Server**.
2. Click **New Data Source**.
3. Fill out the form:
   * **Name:** (e.g., `SonarQube – Production`)
   * **Base URL:** Your SonarQube server address (e.g., `https://sonar.company.com`)
   * **User Token:** Paste the token you generated earlier
4. Click **Test Connection** to verify access.

<figure><img src="https://3582076375-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MGIlBSTjQtZxUoFwUx4%2Fuploads%2FSOoKZUv6vaTwUuVvb4iX%2Fimage.png?alt=media&#x26;token=c362b609-b413-4efe-9415-570b0246ec25" alt="" width="375"><figcaption><p>Adding a new SonarQube data source</p></figcaption></figure>

***

### 4. Explore Your Code Quality Insights

After integration, Oobeya continuously imports your **SonarQube metrics**, including:

* **Code Quality Issues**
* **Quality Gate Status**
* **Technical Debt**
* **Maintainability, Reliability, and Security Ratings**

You can explore this data in:

* **Dashboards** — for overall visibility

<figure><img src="https://3582076375-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MGIlBSTjQtZxUoFwUx4%2Fuploads%2FJlKQQ2eDGm8eSzqPZ3fX%2Fimage.png?alt=media&#x26;token=c7ba2797-1fe6-4aad-bac1-f3ad27476e58" alt=""><figcaption><p>Improved visibility and ownership for better code quality and security</p></figcaption></figure>

* **Organizational, Team, and Individual Scorecards** — to track trends and KPIs

<figure><img src="https://3582076375-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MGIlBSTjQtZxUoFwUx4%2Fuploads%2FsD91TH29lh6Pf6t9y4Ax%2Fimage.png?alt=media&#x26;token=2db5cde2-3786-44da-8b68-45d2d6d3a2a7" alt=""><figcaption><p>Sonarqube metrics in Team Scorecards</p></figcaption></figure>

* **Engineering Insights / Symptoms** — to proactively detect unhealthy code practices **-** [*learn more here*](https://docs.oobeya.io/use-cases/proactive-issue-detection)*.*<br>

<figure><img src="https://3582076375-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MGIlBSTjQtZxUoFwUx4%2Fuploads%2FfHlXLua9Qx96i9VSBnrI%2Fimage.png?alt=media&#x26;token=4650bf21-1cf6-4f5a-b075-2449e01444e5" alt=""><figcaption><p>Code Quality Insights: Auto-detected Symptoms</p></figcaption></figure>

* **Gamification -** [*learn more here*](https://docs.oobeya.io/use-cases/gamification-for-engineering-kpis)*.*

<figure><img src="https://3582076375-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MGIlBSTjQtZxUoFwUx4%2Fuploads%2FjQ8S7p1dE3ISmWzvZimB%2Fimage.png?alt=media&#x26;token=e51efeaf-d291-4c48-be9e-c420ceec6e8f" alt=""><figcaption><p>Leveraging gamification to improve code quality</p></figcaption></figure>

***

### 5. Troubleshooting

If your connection test fails or data is missing, review the following checks:

<table><thead><tr><th width="183.75469970703125">Issue</th><th width="195.8480224609375">Possible Cause</th><th>Solution</th></tr></thead><tbody><tr><td><strong>401 Unauthorized</strong></td><td>Invalid or expired token</td><td>Regenerate a valid User Token and update the Data Source.</td></tr><tr><td><strong>Connection Timeout</strong></td><td>Firewall or proxy blocking requests</td><td>Ensure outbound access to your SonarQube server from Oobeya’s network.</td></tr><tr><td><strong>No Projects Found</strong></td><td>Token lacks permissions</td><td>Verify the token user has project “Browse” or “Admin” permissions.</td></tr><tr><td><strong>SSL Error</strong></td><td>Invalid SSL certificate</td><td>Use a valid SSL certificate or enable trusted certificate configuration.</td></tr><tr><td><strong>Data Outdated</strong></td><td>Sync delay or rate limit</td><td>Trigger a manual re-sync or check your SonarQube server performance.</td></tr></tbody></table>

**💬 Still need help?**\
Contact Oobeya Support or reach out to your Customer Success Manager.

***

### Summary: Connect in 5 Steps

<table><thead><tr><th width="83.13421630859375">Step</th><th width="329.26531982421875">Action</th><th>Result</th></tr></thead><tbody><tr><td>1</td><td>Generate a User Token in SonarQube</td><td>Secure authentication</td></tr><tr><td>2</td><td>Install the SonarQube Server Add-on in Oobeya</td><td>Enable integration</td></tr><tr><td>3</td><td>Add a Data Source</td><td>Connect Oobeya to your SonarQube server</td></tr><tr><td>4</td><td>View Dashboards and Scorecards</td><td>Monitor real-time code quality</td></tr></tbody></table>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.oobeya.io/integrations/all-integrations/code-quality-addons/sonarqube-integration.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
