Giter Site home page Giter Site logo

Comments (4)

niedbalski avatar niedbalski commented on May 20, 2024

@prolane

In my opinion a single label named 'aggregates', which can be a space/comma separated list of aggregates on which a specific hypervisor belongs to should suffice to solve this issue as you can filter by a specific label and sum the vcpus_available. Any drawbacks on using this approach?

from openstack-exporter.

prolane avatar prolane commented on May 20, 2024

Thats certainly a possibility @niedbalski. I guess if we make the space/comma separated list in alphabetical order, we make sure we don't end up with lots of different combinations. For example, you don't get one hypervisor which has the 'aggregates' label value set to "az-west,ssd-hosts,shared-cluster" and one other set to "ssd-hosts,az-west,shared-cluster".

Just one drawback of this approach is, if you have hypervisors being part of more than one aggregate, you can not group by one aggregate. For example, with the example aggregates label values above, I won't be able to group by just the ssd-hosts. Not without making hard coded dashboards in Grafana for example.

Ideally, you would want to do something like this:
sum(vcpus_available) by(aggregates)

And make rules (for alerting), like this:
sum(vcpus_available) by(aggregates) < 20

This will still work for the collection of hypervisors which all have the same combination of aggregates (e.g. "az-west,ssd-hosts,shared-cluster"), but if I then would want to alert on when vcpus are running low on just the ssd-hosts, I would have to make it hardcoded like:
sum(vcpus_available{aggregates=~".*ssd-hosts.*"}) by(aggregates) < 20

Perhaps this is fine, as I guess usually teams don't often add new aggregates?

from openstack-exporter.

prolane avatar prolane commented on May 20, 2024

This PR does the job: #75

Happy X-mas holidays! Cheers!

from openstack-exporter.

niedbalski avatar niedbalski commented on May 20, 2024

Merged #75 , Thank you very much for your amazing contributions @prolane !

from openstack-exporter.

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.