Monitor SonarQube projects in Catalog with the Konnect UI
Install the SonarQube integration in Konnect and authorize access with your SonarQube personal access token, then link a project to your Catalog service.
Prerequisites
Kong Konnect
If you don’t have a Konnect account, you can get started quickly with our onboarding wizard.
- The following Konnect items are required to complete this tutorial:
- Personal access token (PAT): Create a new personal access token by opening the Konnect PAT page and selecting Generate Token.
-
Set the personal access token as an environment variable:
export KONNECT_TOKEN='YOUR KONNECT TOKEN'Copied!
Konnect roles
You need the Integration Admin role in Konnect to install and authorize Catalog integrations.
SonarQube
You need to configure the following in SonarQube Cloud:
SonarQube Server isn’t supported.
Configure the SonarQube integration
Before you can discover SonarQube projects in Catalog, you must configure the SonarQube integration.
- In the Konnect sidebar, click Catalog.
- In the Catalog sidebar, click Integrations.
- Click SonarQube.
- Click Add SonarQube instance.
- In the SonarQube API key field, enter your SonarQube personal access token.
- In the Display name field, enter
SonarQube. - In the Instance name field, enter
sonarqube. - Click Save.
Create a Catalog service and map the SLO resources
Now that your integration is configured, you can create a Catalog service to map the ingested projects.
In this tutorial, we’ll refer to your ingested SonarQube project as
billing-project.
- In the Konnect sidebar, click Catalog.
- In the Catalog sidebar, click Services.
- Click New service.
- In the Display Name field, enter
Billing Service. - In the Name field, enter
billing-service. - Click Create.
- Click Map Resources.
- Select
billing-project. - Click Map 1 Resource.
Your integration projects are now discoverable from one Catalog service.
You may need to manually sync your SonarQube integration for resources to appear. From the Konnect UI by navigating to the SonarQube integration you just installed and selecting Sync Now from the Actions dropdown menu.
Validate the mapping
To confirm that the SonarQube resource is now mapped to the intended service, navigate to the service:
- In the Konnect sidebar, click Catalog.
- In the Catalog sidebar, click Services.
- Click the Billing Service service.
- Click the Resources tab.
You should see the billing-project resource listed.