Hello ,
I'am using prometheus agent-mode to send metrics to the centrllized one , and i want to filter metrics based on cluster. for example up{cluster="agent-cluster} or up{cluster="central-cluster}
i added this to agent-prom:
prometheus:
prometheusSpec:
externalLabels:
cluster: agent-cluster
BUT it does not work for the central one cause its not sending metrics to another system now i can only do up{cluster=agent-cluster}.
I tried adding this to every job but it didnt work and they disapeared from prometheus targets.
prometheus-node-exporter:
prometheus:
monitor:
metricRelabelings:
- target_label: "cluster"
replacement: "central-cluster"