add support for params and different metrics paths for proxied exporter
This commit is contained in:
parent
dcb85ef10a
commit
c769595755
2 changed files with 6 additions and 1 deletions
|
|
@ -242,6 +242,7 @@ prometheus_agent:
|
||||||
jobs: {}
|
jobs: {}
|
||||||
scrape_timeout: ~
|
scrape_timeout: ~
|
||||||
scrape_interval: ~
|
scrape_interval: ~
|
||||||
|
metrics_path: ~
|
||||||
scrapers: {}
|
scrapers: {}
|
||||||
ansible_groups_as_labels: True
|
ansible_groups_as_labels: True
|
||||||
labels: {}
|
labels: {}
|
||||||
|
|
|
||||||
|
|
@ -58,8 +58,12 @@
|
||||||
{% for j in prometheus_agent.scrapers[item].proxy|d({}) %}
|
{% for j in prometheus_agent.scrapers[item].proxy|d({}) %}
|
||||||
- job_name: "prometheus-agent - proxy - {{ j }} : {{ inventory_hostname }}"
|
- job_name: "prometheus-agent - proxy - {{ j }} : {{ inventory_hostname }}"
|
||||||
scheme: https
|
scheme: https
|
||||||
{% for i in ['scrape_timeout', 'scrape_interval'] if prometheus_agent[i] or i in prometheus_agent.agents.proxy.mappings[j] %}
|
{% for i in ['scrape_timeout', 'scrape_interval', 'metrics_path'] if prometheus_agent[i] or i in prometheus_agent.agents.proxy.mappings[j] %}
|
||||||
{{ i }}: {{ prometheus_agent.agents.proxy.mappings[j].get(i, prometheus_agent[i]) }}
|
{{ i }}: {{ prometheus_agent.agents.proxy.mappings[j].get(i, prometheus_agent[i]) }}
|
||||||
|
{% endfor %}
|
||||||
|
params:
|
||||||
|
{% for i in prometheus_agent.agents.proxy.mappings[j].params|d({}) %}
|
||||||
|
{{ i|to_json }}: {{ prometheus_agent.agents.proxy.mappings[j].params[i]|to_json }}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
static_configs:
|
static_configs:
|
||||||
- targets:
|
- targets:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue