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

Allow custom metrics from a different pod #504

Open
clarkmcc opened this issue Feb 3, 2023 · 3 comments
Open

Allow custom metrics from a different pod #504

clarkmcc opened this issue Feb 3, 2023 · 3 comments

Comments

@clarkmcc
Copy link

clarkmcc commented Feb 3, 2023

I have two deployments, where one should be scaled based on a metric from the other deployment, the problem is that the custom-metrics-stackdriver-adapter attaches pod name when it queries the monitoring API. This prevents me from using metrics from any pod, except the pod I'm trying to auto-scale.

I0203 18:07:49.909309 1 filter_builder.go:258] Query with filter(s): "metric.labels.pod = \"analyzer-54bb4ff4dc-hnzn5\" AND metric.type = \"prometheus.googleapis.com/"...

Is there a workaround?

@tomarsnap
Copy link

I think I had a similar issue using the type Pods metric. I got this working with the external metrics like so:

metrics:
  - type: External
    external:
      metric:
        name: prometheus.googleapis.com|jobs|gauge
      target:
        type: AverageValue
        averageValue: 1

@piotrgrohs
Copy link

its not working on me if i try to use extenral type metrics. Prometheus.googleapis not found.

@CatherineF-dev
Copy link
Contributor

cc @piotrgrohs do you have google-managed-prometheus in your cluster?

Metrics collected by google-managed-prometheus will be sent into prometheus.googleapis.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

4 participants