Prometheus Labeling Problem

29 views
Skip to first unread message

Siradj Eddine Fisli

unread,
Jan 14, 2024, 6:02:54 PM1/14/24
to Prometheus Users
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"
Reply all
Reply to author
Forward
0 new messages