Git Product home page Git Product logo

Comments (7)

kawych avatar kawych commented on June 13, 2024 1

Thanks for filing this issue. Can you provide more details? At which point did you get unexpected result?

The endpoint you included is not implemented, the reason being, it would have to include every single metric from Stackdriver. See: https://github.com/GoogleCloudPlatform/k8s-stackdriver/blob/master/custom-metrics-stackdriver-adapter/pkg/adapter/provider/provider.go#L246 It needs some investigation whether it can be safely implemented and for which cases. Have you tried to call http://localhost:8080/apis/external.metrics.k8s.io/v1beta1/namespaces/your-namespace/your-metric-name instead?

Also, can you elaborate on what's your use case for external metrics? I you want to use it for pod autoscaling, please keep in mind that it is not implemented in HPA with 1.9 version.

from k8s-stackdriver.

sterchelen avatar sterchelen commented on June 13, 2024

Thank for your prompt reply !

I want to use the request count of a load balancer (L7) to autoscale.

http://localhost:8080/apis/external.metrics.k8s.io/v1beta1/namespaces/??/loadbalancing.googleapis.com/https/backend_latencies ?

In 1.10 is it implemented ?

from k8s-stackdriver.

kawych avatar kawych commented on June 13, 2024

Yes, it should work with 1.10 according to my knowledge.

Actually "/" character is not allowed in a metric name included in a path (there are some security reasons for this, generally this rule holds across kubernetes APIs). In Custom Metrics - Stackdriver Adapter "|" character is used instead, so your url would be http://localhost:8080/apis/external.metrics.k8s.io/v1beta1/namespaces/??/loadbalancing.googleapis.com|https|backend_latencies. Looks like it's missing in the documentation, I'll add it to avoid further confusion.

from k8s-stackdriver.

sterchelen avatar sterchelen commented on June 13, 2024

Great !
I can get metrics :) ! But can I filter on a label ?

from k8s-stackdriver.

kawych avatar kawych commented on June 13, 2024

Yes, you can filter on labels using labelSelector (similarily to custom metrics api). The label names that can be used are specific to Stackdriver (e.g. resource.labels.resoponse_code). This will be covered in documentation for HPA, which is not published yet.

from k8s-stackdriver.

sterchelen avatar sterchelen commented on June 13, 2024

Thanks a lot !

from k8s-stackdriver.

mholleville avatar mholleville commented on June 13, 2024

Hello ! When i'm trying to fetch backend_latencies I have this following error . Can you help me ?

googleapi: Error 400: Field aggregation.perSeriesAligner had an invalid value of \"ALIGN_RATE\": The aligner cannot be applied to metrics with kind DELTA and value type DISTRIBUTION., badRequest

from k8s-stackdriver.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.