[BUG] Telemetry port (`:5000`) only exposed on `localhost`, not on `0.0.0.0`
Agent Environment
- Datadog Agent Version:
gcr.io/datadoghq/agent:7.54.0-jmx - Relevant configuration: Using the Datadog Agent in a Kubernetes pod.
Describe what happened:
The Datadog agent does not expose the telemetry port (:5000) on 0.0.0.0, but only on localhost. This makes it impossible to scrape the telemetry metrics from outside the pod, which is a common requirement for monitoring setups in Kubernetes environments.
Describe what you expected:
The telemetry port (:5000) should be exposed on 0.0.0.0 so that it can be accessed externally from other pods or services for scraping.
Steps to reproduce the issue:
- Deploy the Datadog agent using the image
gcr.io/datadoghq/agent:7.54.0-jmxin a Kubernetes pod. - Attempt to scrape metrics from the telemetry port (
:5000) from outside the pod. - Notice that the telemetry port is only exposed on
localhost, making it inaccessible externally.
Hi @arnavdugar-openai, thanks for opening an issue !
The telemetry endpoint is not made for users to query but rather for the agent itself it use (eg. from some agent checks, or when creating a flare), so this is not something currently supported. There are also security concerns when binding to 0.0.0.0...
What is your use case for scrapping the telemetry endpoint of the agent ?
Hello @arnavdugar-openai, do you have any information to share on your use case for scrapping the telemetry endpoint ?
This issue has been automatically marked as stale because it has not had activity in the past 15 days.
It will be closed in 30 days if no further activity occurs. If this issue is still relevant, adding a comment will keep it open. Also, you can always reopen the issue if you missed the window.
Thank you for your contributions!