简体   繁体   中英

finding timeseries in prometheus that have the most labels

Prometheus recommends not using too many labels for timeseries and VictoriaMetrics is even dropping labels if you have more than 30.

But how can I find timeseries that have too many / more than a certain amount of labels? Is that even possible with PromQL?

AFAIK there is no way to measure the number of labels in metrics.

The issue is not the number of labels but the cardinality of the metric . Even if you have 10 labels and 3 of them are constant ( __name__ , job , instance ) and if the 7 others have 2 values each, you reach a cardinality of 128 for a single metric which is already the limit as rule of thumb.

Therefore, it is not something decided a posteriori or monitored but rather decided at design time: the right number of labels is as few as possible.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM