diff options
author | Christian Pointner <equinox@spreadspace.org> | 2021-10-26 00:49:54 +0200 |
---|---|---|
committer | Christian Pointner <equinox@spreadspace.org> | 2021-10-26 00:49:54 +0200 |
commit | 61700fa5c63b6f2a45b2ba3210247b4fe6028afa (patch) | |
tree | 128dc93901d267c7e21e741dbfc0a994a658c357 /roles/monitoring/prometheus/exporter/base/templates | |
parent | disable all grafana dashboards for now (diff) |
prometheus: scrape exporter running on server using localhost address
Diffstat (limited to 'roles/monitoring/prometheus/exporter/base/templates')
-rw-r--r-- | roles/monitoring/prometheus/exporter/base/templates/nginx-vhost.j2 | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/roles/monitoring/prometheus/exporter/base/templates/nginx-vhost.j2 b/roles/monitoring/prometheus/exporter/base/templates/nginx-vhost.j2 index 70e65b29..a392e821 100644 --- a/roles/monitoring/prometheus/exporter/base/templates/nginx-vhost.j2 +++ b/roles/monitoring/prometheus/exporter/base/templates/nginx-vhost.j2 @@ -1,5 +1,5 @@ server { - listen {{ prometheus_exporter_listen }} ssl; + listen {{ (inventory_hostname == prometheus_server) | ternary('127.0.0.1:9999', prometheus_exporter_listen) }} ssl; server_name _; ssl_certificate /etc/ssl/prometheus/exporter/crt.pem; |