summaryrefslogtreecommitdiff
path: root/roles/monitoring/prometheus/server/templates
diff options
context:
space:
mode:
authorChristian Pointner <equinox@spreadspace.org>2021-06-02 02:25:33 +0200
committerChristian Pointner <equinox@spreadspace.org>2021-06-20 01:44:16 +0200
commit96232fb34906f9efd98189838141d896668d3dd8 (patch)
tree99189ec79f80f7817048d1909c3f85e2d80cc297 /roles/monitoring/prometheus/server/templates
parentprometheus: server CA and certificates (diff)
prometheus: preliminary tls support for exporter connections
Diffstat (limited to 'roles/monitoring/prometheus/server/templates')
-rw-r--r--roles/monitoring/prometheus/server/templates/prometheus.yml.j27
1 files changed, 7 insertions, 0 deletions
diff --git a/roles/monitoring/prometheus/server/templates/prometheus.yml.j2 b/roles/monitoring/prometheus/server/templates/prometheus.yml.j2
index 007afa90..e94ea043 100644
--- a/roles/monitoring/prometheus/server/templates/prometheus.yml.j2
+++ b/roles/monitoring/prometheus/server/templates/prometheus.yml.j2
@@ -9,6 +9,8 @@ scrape_configs:
- job_name: 'prometheus'
static_configs:
- targets: ['localhost:9090']
+ labels:
+ instance: "{{ inventory_hostname }}"
{% for job in prometheus_server_jobs %}
- job_name: '{{ job }}'
@@ -16,6 +18,11 @@ scrape_configs:
params:
module:
- {{ job }}
+ scheme: https
+ tls_config:
+ ca_file: /etc/ssl/prometheus/ca-crt.pem
+ cert_file: /etc/ssl/prometheus/server/exporter-crt.pem
+ key_file: /etc/ssl/prometheus/server/exporter-key.pem
file_sd_configs:
- files:
- "/etc/prometheus/jobs/{{ job }}/*.yml"