- source_labels: [__meta_kubernetes_pod_container_port_name] # try to keep 
the port only if the name is metrics
    action: keep
    regex: metrics


will drop any target that doesn't have that label with that value.  If you 
want to keep targets that *don't* have that label, then allow empty string 
as a match:

  - source_labels: [__meta_kubernetes_pod_container_port_name] # try to keep 
the port only if the name is metrics
    action: keep
    regex: 'metrics|'


-- 
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/3ba2a307-9b28-468a-b185-63526a6cd161%40googlegroups.com.

Reply via email to