diff options
Diffstat (limited to 'roles/monitoring/prometheus/server/templates/targets/generic.yml.j2')
-rw-r--r-- | roles/monitoring/prometheus/server/templates/targets/generic.yml.j2 | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/roles/monitoring/prometheus/server/templates/targets/generic.yml.j2 b/roles/monitoring/prometheus/server/templates/targets/generic.yml.j2 index 6591362b..341cb45a 100644 --- a/roles/monitoring/prometheus/server/templates/targets/generic.yml.j2 +++ b/roles/monitoring/prometheus/server/templates/targets/generic.yml.j2 @@ -1,3 +1,3 @@ -- targets: [ '{{ hostvars[target.instance].prometheus_scrape_endpoint }}' ] +- targets: [ '{{ (target.instance == prometheus_server) | ternary('127.0.0.1:9999', hostvars[target.instance].prometheus_scrape_endpoint) }}' ] labels: instance: '{{ target.instance }}' |