datadog-agent icon indicating copy to clipboard operation
datadog-agent copied to clipboard

[BUG] Telemetry port (`:5000`) only exposed on `localhost`, not on `0.0.0.0`

Open arnavdugar-openai opened this issue 1 year ago • 1 comments

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:

  1. Deploy the Datadog agent using the image gcr.io/datadoghq/agent:7.54.0-jmx in a Kubernetes pod.
  2. Attempt to scrape metrics from the telemetry port (:5000) from outside the pod.
  3. Notice that the telemetry port is only exposed on localhost, making it inaccessible externally.

arnavdugar-openai avatar Sep 16 '24 20:09 arnavdugar-openai

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 ?

pgimalac avatar Sep 17 '24 21:09 pgimalac

Hello @arnavdugar-openai, do you have any information to share on your use case for scrapping the telemetry endpoint ?

pgimalac avatar Oct 10 '24 13:10 pgimalac

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!

dd-octo-sts[bot] avatar Oct 18 '25 04:10 dd-octo-sts[bot]