Sign inSign up

gafda/sonar-metrics

By gafda

•Updated over 4 years ago

Sonar-Metrics is an exporter to get metrics of the SonarQube server on Prometheus format.

Image
0

811

gafda/sonar-metrics repository overview

⁠README

Sonar-Metrics is an exporter to get metrics of the SonarQube server on Prometheus format.

⁠Brief notes
  • Sonar-Metrics is written in Python3 and tested against SonarQube CE
  • It makes use of the following Python external libraries:
    • prometheus-client
    • requests
⁠Change Log
⁠v1.0.4
  • Tested with SonarQube v9.2.4 CE
  • [UPDATED] python v3.10.1
  • [UPDATED] prometheus-client v0.12.0
⁠v1.0.3
  • Tested with SonarQube v8.9 CE and v9 CE
  • [UPDATED] python v3.9.6
  • [UPDATED] prometheus-client v0.11.0
  • [UPDATED] requests v2.26.0
⁠v1.0.2
  • Tested with SonarQube v8.8 CE and v8.9 CE
  • [FIXED] Fixed bug reading 'organization' field
  • [UPDATED] python v3.9.4
  • [UPDATED] prometheus-client v0.10.1
⁠v1.0.1
  • Tested with SonarQube v8.8 CE
  • [UPDATED] Dockerfile restructured with some best-practices
  • [UPDATED] python v3.9.3
  • [UPDATED] prometheus-client v0.10.0
⁠v1.0.0
  • Tested with SonarQube v8.6.1 CE
  • Using:
    • prometheus-client v0.9.0
    • requests v2.15.1
⁠Quick Start
  • ⁠Via Docker
$ docker run -it --rm \
    --name sonar-metrics \
    -p 9119:9119 \
    --net sonarqube_default \
    -e SONAR_SERVER="http://sonarqube:9000" \
    -e SONAR_USERNAME="username" \
    -e SONAR_PASSWORD="password" \
    -e METRICS_PORT=9119 \
    gafda/sonar-metrics
KeyDefault ValueDescription
SONAR_SERVERhttp://sonarqube:9000⁠URI to the SonarQube server
SONAR_USERNAMEusernameValid SonarAdministrator username
SONAR_PASSWORDpasswordPassword of the valid SonarAdministrator
METRICS_PORT9119Port of this container where metrics will be exposed
  • ⁠Validation:

Metrics will be accessible in:

http://localhost:9119
or
http://localhost:9119/metrics

Tag summary

Content type

Image

Digest

Size

21.7 MB

Last updated

over 4 years ago

docker pull gafda/sonar-metrics