Allow to pass metrics_path for static jobs
Change-Id: Ifa4fa71241bf8d2c7e0a4960192d3499252516aa
This commit is contained in:
parent
d949dcef88
commit
dc36045033
1 changed files with 2 additions and 0 deletions
|
@ -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 %}
|
||||
|
|
Loading…
Reference in a new issue