Prometheus Label Replace Example, The name of the label to drop must be specified as a regular expression in regex .


Prometheus Label Replace Example, g. The most common use of prometheus. This can be done with action: labeldrop. But when i want to do this fo For each timeseries in v, label_replace(v instant-vector, dst_label string, replacement string, src_label string, regex string) matches the regular expression regex against the value of the label src_label. The simplest replace example is just setting a label to a fixed value. You can add a new label, but it has to be based on someone existed label. The label_replace function can be used when you want a new label added to the existing metric or a sub-query result, with which you can do further query operations or grafana dashboarding. Nov 5, 2020 · Removing unneeded labels Sometimes it is needed to remove certain labels before storing metrics in Prometheus or VictoriaMetrics. Let's look at some example use cases for the replace action. The replace action substitutes a target label's value with a replacement value if the source label values match the regex. 3gxb, eb21ft, o5bm, y3q, cykvc7, umv, j46wb, ft2t, md, ecsyv,