Sure Brian, I was aware of this. This config comes with a software change, but is there any possibility or workaround in the old (< 2.41) Prometheus releases on this topic?
/Teja On Wednesday, May 22, 2024 at 12:01:31 PM UTC+2 Brian Candler wrote: > Yes, there are similar relabel actions "keepequal" and "dropequal": > > https://prometheus.io/docs/prometheus/latest/configuration/configuration/#relabel_config > > These were added in v2.41.0 > <https://github.com/prometheus/prometheus/releases/v2.41.0> / 2022-12-20 > https://github.com/prometheus/prometheus/pull/11564 > > They behave slightly differently from VM: in Prometheus, the concatenation > of source_labels is compared with target_label. > > On Tuesday 21 May 2024 at 15:43:05 UTC+1 tejaswini vadlamudi wrote: > >> The below relabeling rule from Victoria Metrics is useful for matching >> accurate ports and dropping unwanted targets. - action: >> keep_if_equal >> source_labels: >> [__meta_kubernetes_service_annotation_prometheus_io_port, >> __meta_kubernetes_pod_container_port_number] >> Does anyone know how we can compare two labels using Prometheus >> Relabeling rules? >> >> Based on my analysis, Prometheus doesn't support regex patterns on >> 1. backreferences like \1 >> 2. lookaheads or lookbehinds >> > -- 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/24fc504f-4eee-41e4-8dd3-a13597e6c779n%40googlegroups.com.

