-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
openmetrics
: openmetrics_endpoint
doesn't support Kubernetes' bearer token but prometheus_url
does
#17128
Comments
Hello @pmalek , https://docs.datadoghq.com/containers/kubernetes/prometheus/?tab=kubernetesadv2 is the more up-to-date guide to follow for Prometheus/Openmetrics collection in Kubernetes environments. The
This would allow you to use |
Thanks for the reponse @tbavelier. Sadly https://docs.datadoghq.com/containers/kubernetes/prometheus/?tab=kubernetesadv2 doesn't mention anything about the auth tokens 😅 But it's good to know that we can use that. I'll check this next time I'm around DD configuration. |
Additional environment details (Operating System, Cloud provider, etc):
Kubernetes, kind
Problem statement
https://docs.datadoghq.com/integrations/guide/prometheus-host-collection/#parameters-available mentions the usage of
bearer_token_path
,bearer_token_auth
andopenmetrics_endpoint
but noprometheus_url
, in order to make the agent attach ServiceAccount's token to requests.After some testing and several hours of debugging I came to
integrations-core/datadog_checks_base/datadog_checks/base/checks/openmetrics/base_check.py
Line 15 in 14f280a
prometheus_url
.That's exactly what was missing. I switched
openmetrics_endpoint
toprometheus_url
and now my Pods are correctly attaching the token to requests.Possibly related
DataDog/datadog-agent#2667
The text was updated successfully, but these errors were encountered: