summaryrefslogtreecommitdiff
path: root/roles/monitoring/prometheus/server/templates
diff options
context:
space:
mode:
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"