sonarqube-prometheus-exporter
sonarqube-prometheus-exporter copied to clipboard
Authorization for recieve metrics from Private Projects?
trafficstars
Is it possible to add auth for recieve metrics from private Projects?
The following did work for me. I generated the Token like this.
- job_name: 'sonarqube-test'
metrics_path: '/api/prometheus/metrics'
scheme: https
static_configs:
- targets: ['your.sonarqube.com']
basic_auth:
username: <TOKEN>
Edit: Formatting
I'm trying to access our sonarqube instance running in AWS from k8s, using the configuration:
spec:
selector:
matchLabels:
app.kubernetes.io/name: sonar-prometheus
namespaceSelector:
matchNames:
- monitoring
endpoints:
- targetPort: 443
scheme: https
interval: 30s
path: /api/prometheus/metrics
bearerTokenSecret:
key: auth-token
I know that I can get the metrics returned by using curl -u<SECRET>: https://serverhost/api/prometheus/metrics but I am not seeing these within our Grafana service.