fixed labels and made ipv4 the default

This commit is contained in:
nd 2020-06-07 00:08:42 +02:00
parent f772558e31
commit 3e2b2dd451
No known key found for this signature in database
GPG key ID: 21B5CD4DEE3670E9
2 changed files with 11 additions and 1 deletions

View file

@ -23,6 +23,7 @@
{% set job=prometheus_agent.agents.blackbox.jobs[j] %}
- job_name: "prometheus-agent - blackbox - {{ j }} : {{ inventory_hostname }}"
scheme: https
metrics_path: /probe
{% for i in ['scrape_timeout', 'scrape_interval'] if (prometheus_agent|combine(job))[i] %}
{{ i }}: {{ (prometheus_agent|combine(job))[i] }}
{% endfor %}
@ -42,9 +43,11 @@
- source_labels: [__address__]
target_label: __param_target
- source_labels: [__param_target]
target_label: instance
target_label: target
- replacement: 'blackbox'
target_label: job
- replacement: '{{ inventory_hostname }}'
target_label: instance
- replacement: '{{ job.module }}'
target_label: module
- target_label: __address__