It looks like you're already limiting to specific namespaces? Is that not
working?
# Optional namespace discovery. If omitted, all namespaces are used.
namespaces:
names:
[ - <string>
<https://prometheus.io/docs/prometheus/latest/configuration/configuration/#string>
]
Otherwise: you're already filtering your prometheus service discovery
results: e.g.
- action: keep
source_labels:
- __meta_kubernetes_service_label_alertmanager
regex: main
- action: keep
source_labels:
- __meta_kubernetes_endpoint_port_name
regex: web
You can addd an additional relabeling keep rule to match on
__meta_kubernetes_namespace with a regex that matches the values of
interest. See:
https://prometheus.io/docs/prometheus/latest/configuration/configuration/#kubernetes_sd_config
--
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/59b38efc-806e-4f1a-a558-c3442bd12b79%40googlegroups.com.