Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dashboard example in need of update #18

Open
Jaff opened this issue Feb 3, 2022 · 0 comments
Open

Dashboard example in need of update #18

Jaff opened this issue Feb 3, 2022 · 0 comments

Comments

@Jaff
Copy link

Jaff commented Feb 3, 2022

Using the sonarqube-prometheus-exporter-1.0.0.jar, with SonarQube 8.9+ (currently running 9.2.4-developer edition) we are seeing metrics rendered as:

# HELP sonarqube_bugs Bugs
# TYPE sonarqube_bugs gauge
sonarqube_bugs{key="npvr-nextgen-entitlement-lib",name="entitlement-lib",} 0.0
sonarqube_bugs{key="udf-danube-transformer",name="danube-distro-udf",} 0.0
sonarqube_bugs{key="voice-ga-c2c-service",name="voice-ga-c2c-service",} 14.0
.
.
.
# HELP sonarqube_coverage Coverage by tests
# TYPE sonarqube_coverage gauge
sonarqube_coverage{key="npvr-nextgen-entitlement-lib",name="entitlement-lib",} 85.0
sonarqube_coverage{key="udf-danube-transformer",name="danube-distro-udf",} 49.8
sonarqube_coverage{key="voice-ga-c2c-service",name="voice-ga-c2c-service",} 77.1
sonarqube_coverage{key="maxwebapp-2.0",name="Max Web App",} 0.0
.
.
.
(and so on...)

Your grafana_config.json uses an expression like this:

      "targets": [
        {
          "expr": "sonar_bugs{name=\"$projectName\"}",
          "format": "time_series",
          "hide": false,
          "intervalFactor": 1,
          "refId": "A"
        }
      ],

I've tried using an alternate set of expressions:

      "targets": [
        {
          "expr": "sonar_bugs{key=\"$projectKey\"}",
          "format": "time_series",
          "hide": false,
          "intervalFactor": 1,
          "refId": "A"
        }
      ],

Since our data-set contains 132 names, but 156 keys, so I chose to represent the set that way. However, in Grafana, it will only render the first 9 rows, with the remainder showing "No Data"
I am at a loss as to how this is happening.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant