Skip to content
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

Error while validating API key: https://api.datadoghq.eu/api/v1/validate: Not Found #29445

Closed
AxelJoly opened this issue Nov 22, 2023 · 6 comments
Labels
bug Something isn't working exporter/datadog Datadog components Stale waiting for author

Comments

@AxelJoly
Copy link

AxelJoly commented Nov 22, 2023

Component(s)

exporter/datadog

What happened?

Description

I'm running the opentelemetry-collector-contrib:0.82.0 on my EKS cluster. I tried as well on previous version (0.75) and got the same result.
With the config below, I get the following log:

2023-11-22T08:25:43.051Z warn clientutil/api.go:48 Error while validating API key {"kind": "exporter", "data_type": "metrics", "name": "datadog", "error": "Get \"https://api.datadoghq.eu/api/v1/validate\": Not Found"}

When I run the following command on my terminal, I have no issues:

curl -X GET "https://api.datadoghq.eu/api/v1/validate" -H "Accept: application/json" -H "DD-API-KEY: myapikey" {"valid":true}
I tried it in a sidecar container and it's working fine as well with the curl command.

Steps to Reproduce

Run opentelemetry-collector-contrib:0.82.0 image
add the following config with a valid key

Expected Result

The /api/v1/validate should be validating my key

Actual Result

The /api/v1/validate doesn't validate my key

Collector version

0.82

Environment information

Environment

EKS 1.25, running on Amazon Linux 2 AMIs

OpenTelemetry Collector configuration

exporters:
  datadog:
    api:
      key: myapikey
      site: datadoghq.eu
    tls:
      insecure_skip_verify: true

Log output

`2023-11-22T08:25:43.051Z    warn    clientutil/api.go:48    Error while validating API key    {"kind": "exporter", "data_type": "metrics", "name": "datadog", "error": "Get \"https://api.datadoghq.eu/api/v1/validate\": Not Found"}`

Additional context

No response

@AxelJoly AxelJoly added bug Something isn't working needs triage New item requiring triage labels Nov 22, 2023
@github-actions github-actions bot added the exporter/datadog Datadog components label Nov 22, 2023
Copy link
Contributor

Pinging code owners:

See Adding Labels via Comments if you do not have permissions to add labels yourself.

@mx-psi
Copy link
Member

mx-psi commented Nov 22, 2023

@AxelJoly Is it possible you are using some kind of proxy? To validate this, you can try running the Collector locally with a minimal configuration and see if the API key is correctly validated.

@AxelJoly
Copy link
Author

AxelJoly commented Nov 22, 2023

Hi @mx-psi , yes we are behind a proxy, we added a bunch of proxy settings in the deployment file.

      - env:
        - name: HTTP_PROXY
          value: http://myproxy:80
        - name: HTTPS_PROXY
          value:  http://myproxy:80
        - name: NO_PROXY
          value: 127.0.0.1,localhost,datadog-agent.datadog.svc.cluster.local:8126,172.25.0.0/16,169.254.0.0/16,10.147.0.0/16

For the sidecar test, I added the proxy option to my curl command and it works. Could it be the datadog ignoring the proxy context?
Thank you for your fast answer.

@mx-psi
Copy link
Member

mx-psi commented Nov 22, 2023

Could it be the datadog ignoring the proxy context?

The HTTP client used for validation takes the proxy from the environment variables

Could it be that you are not setting the environment variables correctly in the Collector's environment?

@songy23 songy23 removed the needs triage New item requiring triage label Dec 4, 2023
Copy link
Contributor

github-actions bot commented Feb 5, 2024

This issue has been inactive for 60 days. It will be closed in 60 days if there is no activity. To ping code owners by adding a component label, see Adding Labels via Comments, or if you are unsure of which component this issue relates to, please ping @open-telemetry/collector-contrib-triagers. If this issue is still relevant, please ping the code owners or leave a comment explaining why it is still relevant. Otherwise, please close it.

Pinging code owners:

See Adding Labels via Comments if you do not have permissions to add labels yourself.

@github-actions github-actions bot added the Stale label Feb 5, 2024
@mx-psi
Copy link
Member

mx-psi commented Mar 8, 2024

Closing this as we haven't gotten a reply since November, @AxelJoly feel free to comment and we will reopen

@mx-psi mx-psi closed this as not planned Won't fix, can't repro, duplicate, stale Mar 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working exporter/datadog Datadog components Stale waiting for author
Projects
None yet
Development

No branches or pull requests

4 participants