Hi Team,
I want to display clustername for my all prometheus queries. Tried adding below two scrape configs but getting the same output.
additionalScrapeConfigs:
- job_name: 'local'
honor_labels: true
static_configs:
- targets:
- '<ip>:<nodePort>'
labels:
cluster: 'qa-app'
additionalScrapeConfigs:
- job_name: 'local'
honor_labels: true
static_configs:
- targets:
- '127.0.0.1'
labels:
cluster: 'qa-app'
query:
up{job="apiserver"}
Output:
Currentoutput:
up{endpoint="https",instance="<ip>:6443",job="apiserver",namespace="default",service="kubernetes"} 1
Expected output:
up{cluster: 'qa-app',endpoint="https",instance="<ip>:6443",job="apiserver",namespace="default",service="kubernetes"} 1