I have many instances located at two different cities (İstanbul and Ankara) I want to add the city location attribute automatically into all metrics coming from these instances by indicating host in prometheus configuration. I have posted an example prometheus configuration. Is there a way of adding such custom attribute?
--Actual --
- job_name: 'my-app'
scrape_interval: 60s
metrics_path: /actuator/prometheus
static_configs:
- targets:
- 172.18.11.33:8081
- 172.18.11.34:8080
-- my expection added geolocation indicator--
job_name: 'my-app'
scrape_interval: 60s
metrics_path: /actuator/prometheus
static_configs:
- targets:
- 172.18.11.33:8081;geo='istanbul’
- 172.18.11.34:8080;"geo='ankara'