/sonarqube-prometheus-exporter

Prometheus Exporter for SonarQube

Primary LanguageJavaApache License 2.0Apache-2.0

Sonarqube Prometheus Exporter

Prometheus Exporter Plugin for SonarQube.

Build Status SonarCloud Analysis Download License Semantic Versioning

FeaturesRequirementsInstallationUsageScreenshots

Features

  • Configure which metrics to export

Requirements

  • SonarQube 7.x

Installation

  1. Download latest snapshot release
  2. Drop sonar-prometheus-exporter-1.0.0-SNAPSHOT.jar into $SONARQUBE_HOME/extensions/plugins.
  3. Restart the SonarQube server.

Usage

  1. Configure which metrics you want to export under Administration → Configuration → General Settings → Prometheus Exporter
  2. Add a scrape config to your Prometheus instance similar to this:
scrape_configs:
  - job_name: 'sonarqube'
    metrics_path: '/api/prometheus/metrics'
    static_configs:
      - targets: ['localhost:9000']
  1. Alternatively, point your HTTP client to http://localhost:9000/api/prometheus/metrics

Screenshots

Configuration Page API Call Example Grafana Dashboard