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

Cluster Agent not honoring Site parameter when MetricsProvider is queried #103

Closed
mantoine96 opened this issue May 28, 2020 · 0 comments
Closed

Comments

@mantoine96
Copy link
Contributor

Describe what happened:

I'm using Datadog Cluster Agent with metricsProviderEnabled: true and Site: datadoghq.eu

After configuring an HPA, I started seeing these errors:

2020-05-28 11:17:23 UTC | CLUSTER | ERROR | (pkg/util/kubernetes/autoscalers/datadogexternal.go:84 in queryDatadogExternal) | Error while executing metric query avg:eng_kyc_service.process.files.open{cluster_name:dev-eu-west-1-test,env:dev}.rollup(30): API error 403 Forbidden: {"errors": ["Invalid API key or Application key"]}
2020-05-28 11:17:23 UTC | CLUSTER | ERROR | (pkg/util/kubernetes/autoscalers/processor.go:80 in UpdateExternalMetrics) | Error getting metrics from Datadog: [Error while executing metric query avg:eng_kyc_service.process.files.open{cluster_name:dev-eu-west-1-test,env:dev}.rollup(30): API error 403 Forbidden: {"errors": ["Invalid API key or Application key"]}, strconv.Atoi: parsing "": invalid syntax]

I verified my credentials and they are valid, as long as you point to datadoghq.eu. Setting DATADOG_HOST=https://app.datadoghq.eu solved this.

Describe what you expected:

I would expect one of two things:

  • DATADOG_HOST is populated from DD_SITE and DD_DD_URL when creating the Cluster Agent deployment
  • Datadog Cluster Agent's client library leverages DD_SITE and DD_DD_URL to create the client.

Steps to reproduce the issue:

  • Create a Datadog Cluster agent deployment with datadoghq.eu credentials and `metricsProviderEnablk
  • Create an HPA using an external metric

Additional environment details (Operating System, Cloud provider, etc):

mantoine96 added a commit to mantoine96/datadog-operator that referenced this issue May 28, 2020
gtseres pushed a commit to gtseres/datadog-operator that referenced this issue Jun 1, 2020
…er is enabled. Resolves DataDog#103 (DataDog#104)

* Set DATADOG_HOST according to DD_SITE or DD_DD_URL when MetricsProvider is enabled. Resolves DataDog#103

Co-authored-by: Cedric Lamoriniere <cedric.lamoriniere@datadoghq.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant