Hi, Is the label really a label coming directly from the instrumentation, that is, the target's /metrics page, or is it a target label (in which case you'll want to use relabel_configs, not metric_relabel_configs)? What kind of ID is it?
Regards, Julius On Sun, Apr 3, 2022 at 8:33 PM GI D <[email protected]> wrote: > Thanks for answering, > Following what you wrote, I now have the following multiple times in my > config: > > metric_relabel_configs: > - separator: ; > regex: id > replacement: $1 > action: labeldrop > > However, and after restarting the Prometheus stateful set, in my TSDB > status the ID label is still there, with the same cardinality as before, in > the table titled: "Top 10 label names with high memory usage" > > Please advise. > > > > On Friday, April 1, 2022 at 10:22:26 PM UTC+3 [email protected] wrote: > >> To drop a label from a series during the scrape, you need the "labeldrop" >> action ("drop" drops the entire series), see >> https://training.promlabs.com/training/relabeling/writing-relabeling-rules/keeping-and-dropping-labels >> >> However, just dropping a label that is required to distinguish series >> from each other will cause you problems if that results in multiple time >> series now having the same labelset identity after the relabeling. Maybe >> your intent is to aggregate over multiple series instead? >> >> On Fri, Apr 1, 2022 at 7:02 PM GI D <[email protected]> wrote: >> >>> <https://stackoverflow.com/posts/71690642/timeline> >>> >>> Running Prometheus on K8s v1.20 on AWS/EKS, In my v33 Helm chart I need >>> to drop the ID label in order to reduce the TSDB size. According to this >>> article >>> <https://grafana.com/blog/2022/03/21/how-relabeling-in-prometheus-works/>, >>> this can be done with Metric Relabelings. So in all relevant sections of >>> the values file I have the following: >>> metricRelabelings: >>> - sourceLabels: [id] >>> action: "drop" >>> >>> In the resulting Prometheus config that I can see in the web GUI on port >>> 9090, this gets translated (again in all relevant sections) as follows: >>> metric_relabel_configs: >>> - source_labels: [id] >>> separator: ; >>> regex: (.*) >>> replacement: $1 >>> action: drop >>> >>> However in the TSDB status in the GUI the "id" label is still there, >>> with the same cardinality as before the attempt to drop it. >>> >>> What am I missing? >>> >>> -- >>> You received this message because you are subscribed to the Google >>> Groups "Prometheus Users" group. >>> To unsubscribe from this group and stop receiving emails from it, send >>> an email to [email protected]. >>> To view this discussion on the web visit >>> https://groups.google.com/d/msgid/prometheus-users/06058e34-00e4-4034-a572-bb45098f7d3en%40googlegroups.com >>> <https://groups.google.com/d/msgid/prometheus-users/06058e34-00e4-4034-a572-bb45098f7d3en%40googlegroups.com?utm_medium=email&utm_source=footer> >>> . >>> >> >> >> -- >> Julius Volz >> PromLabs - promlabs.com >> > -- > You received this message because you are subscribed to the Google Groups > "Prometheus Users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/prometheus-users/8d45baf5-e25c-474d-8f7a-b30a6035a48cn%40googlegroups.com > <https://groups.google.com/d/msgid/prometheus-users/8d45baf5-e25c-474d-8f7a-b30a6035a48cn%40googlegroups.com?utm_medium=email&utm_source=footer> > . > -- Julius Volz PromLabs - promlabs.com -- You received this message because you are subscribed to the Google Groups "Prometheus Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/prometheus-users/CAObpH5xr%3DScOL9ctRxAdK3T%2BbnQnxU%3DQpdQtsXRYXWBkwYjBLQ%40mail.gmail.com.

