Hi!

My use case is to keep targets (kubernetes sd) only if the values of two 
specific lables are equal. Can this be done ?

My Idea was to concatenate lables and do a regex lookahead comparison. The 
problem is that, unfortunately, lookahead is not supported by go's RE2.

Here is what I tried:
      # Only keep pods if container port matches tcp-port annotation
      - source_labels:
        - __meta_kubernetes_pod_container_port_number
        - __meta_kubernetes_pod_annotation_tcp_port
        action: keep
        regex: ([^;]+);(?=\1$)

Is there any other way around ?

-- 
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/009fd413-efa0-42d5-bc12-a29ca9f5113dn%40googlegroups.com.

Reply via email to