Setting up with Datadog
In case of a Kubernetes deployment, you can use Datadog to collect the metrics provided through the SonarQube’s Web API (Openmetrics format).
Last updated
Was this helpful?
Was this helpful?
agents:
volumes:
- name: secret-volume
secret:
secretName: datadog-api-secret
items:
- key: passcode
path: passcode
volumeMounts:
- name: secret-volume
mountPath: /etc/secret-volume# Set annotations for pods
annotations:
#ad.datadoghq.com/<EXPECTED_POD_NAME>.checks
ad.datadoghq.com/sonarqube-dce.checks: |
{
"openmetrics": {
"init_config": {},
"instances": [
{
"openmetrics_endpoint": "http://%%host%%:9000/api/monitoring/metrics",
"metrics": [".*"],
"auth_token":
{
"reader":
{
"type": "file",
"path": "/etc/secret-volume/passcode"
},
"writer":
{
"type": "header",
"name": "Authorization",
"value": "Bearer <TOKEN>"
}
}
}
]
}
}