0
votes

My ultimate goal is to get sonarqube metric to grafana. I discovered a plugin that exports sonar qube metrics as prometheus metrics.

My drill down into the issue shows that I am unable to query the metrics page from grafana so I found the minimum setup I need to test my problem. I do not need to run sonarquebe to test this issue.

Prometheus runs at http://localhost:9090

When I configure the source to be http://localhost:9090 I can query the stat go_memstats_alloc_bytes which is available in a default prometheus server.

When I set the source to be http://localhost:9090/metrics and the connection mode to browser I can no longer query the value go_memstats_alloc_bytes

At this point I am unsure If I should be able to do so. The SonarQuebe plugin that I ultimately want to use emits a metrics page in the Prometheus format but does not actually function like a prometheus instance.

Is there some way that I can scrape the metrics page to get what I want?

1

1 Answers

0
votes

My mistake was that I assumed grafana would read prometheus metrics. Instead prometheus can read prometheus metrics and grafana can use prometheus as a source. So I scraping is done by prometheus instead of what I assumed grafana.