Git Product home page Git Product logo

Comments (2)

hansmi avatar hansmi commented on June 20, 2024

Thank you for your feedback and observation. You're right, stuffing all non-numeric fields into *_info was probably a bad choice in hindsight. The code has been out there for almost two years and such fundamental changes need to be gradual. Start by emitting the new metrics and add a flag to disable the old ones and after some amount of time delete the old labels.

We can add *_info-esque metrics for the non-numeric values:

lvm_lv_info{lv_name="lv_db_backup",lv_uuid="r7Btja-…"} 1
lvm_lv_attr{lv_uuid="r7Btja-…",value="-wi-ao----"} 1

I'd keep a few basic things like the name in _info. What do you think?

Also, UUID as only label on the other metrics makes data querying very complex.

The UUID is the only stable identifier during the lifetime of an object in LVM. Examples from my own rules:

lvm_pv_info{pv_attr=~"..[^-].*"} or on (instance, pv_uuid)
lvm_pv_missing > 0
lvm_vg_info{vg_attr=~"...[^-].*"} or on (instance, vg_uuid)
lvm_vg_missing_pv_count != 0 or on (instance, vg_uuid)
lvm_vg_partial != 0

from prometheus-lvm-exporter.

raspbeguy avatar raspbeguy commented on June 20, 2024

I understand the non-breaking decision.

My point was not to split metrics into even more label-only metrics. Ideally I wish they were gone, but I understand that for the sake of non breaking things they won't. Having metrics which are always equal to 1 and whose labels play the role of metrics dosn't make any sense to me, as this is poisoning how prometheus manages and stores its metrics. You have even lv_active which has a numeric value (0 or 1) as a label while it should clearly be the value of a dedicated metric, say lvm_lv_active.

Every labels that has a finite number of values (for example lv_permissions) should have its own dedicated metric, and the values matched to integers.

IMHO the only labels to be kept as is are the properties that defines the entity (for example lv_dm_path, lv_uuid, lv_name which are by nature stable and normally won't change (I know you can technically change a lv name, but that's not something that is volatile by nature). Those labels should also be added to all metrics, not only the *_info ones

Optionally, have a setting to let the user add any label needed.

from prometheus-lvm-exporter.

Related Issues (6)

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.