From dc3604503361be2ea2a6d3d13d62da182d79b5e8 Mon Sep 17 00:00:00 2001 From: Bartosz Kupidura Date: Mon, 21 Aug 2017 11:32:02 +0200 Subject: [PATCH] Allow to pass metrics_path for static jobs Change-Id: Ifa4fa71241bf8d2c7e0a4960192d3499252516aa --- prometheus/files/prometheus.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/prometheus/files/prometheus.yml b/prometheus/files/prometheus.yml index 445c476..d235282 100644 --- a/prometheus/files/prometheus.yml +++ b/prometheus/files/prometheus.yml @@ -44,6 +44,7 @@ rule_files: {%- if static_target[job_name] is not defined %} {%- do static_target.update({job_name: { 'enabled': job.get('enabled', True), + 'metrics_path': job.get('metrics_path', '/metrics'), 'scheme': job.get('scheme', 'http')} }) %} {%- if job.get('tls_config') %} @@ -81,6 +82,7 @@ scrape_configs: {%- if nodes|length > 0 and job.get('enabled', True) %} - job_name: {{ job_name }} {% if job.get('scheme') %}scheme: {{ job.scheme }}{%- endif %} + {% if job.get('metrics_path') %}metrics_path: {{ job.metrics_path }}{%- endif %} {%- if job.get('tls_config') %} tls_config: {% if job.tls_config.get('skip_verify') is defined %}insecure_skip_verify: {{ job.tls_config.skip_verify | lower }}{%- endif %}