-
Notifications
You must be signed in to change notification settings - Fork 7
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
Bad use of labels #31
Comments
Thank you for your feedback and observation. You're right, stuffing all non-numeric fields into We can add
I'd keep a few basic things like the name in
The UUID is the only stable identifier during the lifetime of an object in LVM. Examples from my own rules:
|
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 Every labels that has a finite number of values (for example IMHO the only labels to be kept as is are the properties that defines the entity (for example Optionally, have a setting to let the user add any label needed. |
Every report group (PV, VG, LV) had its own info metric where non-numeric fields like `pv_attr` were reported as a label. Every unique combination of labels produces a new time series. From https://prometheus.io/docs/practices/naming/#labels: > Remember that every unique combination of key-value label pairs > represents a new time series, which can dramatically increase the > amount of data stored. Do not use labels to store dimensions with high > cardinality (many different label values), such as user IDs, email > addresses, or other unbounded sets of values. With this change the labels on the info metrics are reduced to names (e.g. `pv_name` and `lv_full_name`). Everything else is moved to separate metrics. A command line flag, enabled by default, retains the labels on the info metric. Related to issue #31.
@raspbeguy, it's been a while. I drafted up #71 to address the excessive labels on the info metrics. Do you want to review? Filtering of any sort will be done separately. For what it's worth |
Every report group (PV, VG, LV) had its own info metric where non-numeric fields like `pv_attr` were reported as a label. Every unique combination of labels produces a new time series. From https://prometheus.io/docs/practices/naming/#labels: > Remember that every unique combination of key-value label pairs > represents a new time series, which can dramatically increase the > amount of data stored. Do not use labels to store dimensions with high > cardinality (many different label values), such as user IDs, email > addresses, or other unbounded sets of values. With this change the labels on the info metrics are reduced to names (e.g. `pv_name` and `lv_full_name`). Everything else is moved to separate metrics. A command line flag, enabled by default, retains the labels on the info metric. Related to issue #31.
Resolved in release 0.4.0. |
Hello,
I see that you defined special metrics
lvm_lv_info
,lvm_vg_info
andlvm_pv_info
which useful data is contained in the labels, and which value is always 1. The other metrics label is only the UUID.This is a bad metric design, as labels should be used to filter metrics, not to carry new information. Also some labels like
lv_attr
are by nature very volatile (it will change when activating/deactivating the volume for example) which leads to harmful multiplication of timeseries, as this extract from prometheus doc reminds:Also, UUID as only label on the other metrics makes data querying very complex.
I suggest dropping the
*_info
metrics and adding a setting allowing the user to include the needed labels on the other metrics.The text was updated successfully, but these errors were encountered: