We are using SonarQube 7.9.6 which is hosted on Kubernetes platform.
We are trying to expose SonarQube app related metrics to Prometheus and facing some difficulties.
Here, It is worth to note that
- we have enabled force user authentication from SonarQube side (
Administration > General Settings > Security)
- We have centralised team managing Prometheus centrally across the organization and currently it is not feasible to add auth/token to Prometheus server.
We have tried to configure Sonarqube Prometheus Exporter in our setup and observed that we are getting 401 error when we try to access path on which metrics are defined to expose. It is quite obvious to get 401 error we have enabled user authentication and we are not passing authentication to Prometheus.
In short, Prometheus is not able to authenticate SonarQube and so not able to fetch metrics.
We have below queries and request to solve them if you have information about them:
- Is there any way to expose SonarQube application related metrics to Prometheus without any authentication ?
- Is it possible to have sidecar container from where we can expose metrics to another port (other than mail port on which sonar is exposed) and that in turns expose metrics to Prometheus without any authentication ?
- Are you familiar with better/ alternative approach to our use case ?