summaryrefslogtreecommitdiff
path: root/roles/monitoring/prometheus/exporter/register/templates/blackbox/probe.yml.j2
blob: fbbce7df1b36a08c25590e398f7e3b3bf2fd7d2c (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
- targets: [ '{{ (target.exporter_hostname == prometheus_server) | ternary('127.0.0.1:9999', hostvars[target.exporter_hostname].prometheus_scrape_endpoint) }}' ]
  labels:
    instance: '{{ target.instance }}'
    svc_kind: '{{ target.config.svc_kind }}'
    svc_instance: '{{ target.config.svc_instance }}'
    __param_target: '{{ target.config.target }}'
    __param_module: '{{ target.config.module }}'
{% if 'hostname' in target.config %}
    __param_hostname: '{{ target.config.hostname }}'
{% endif %}
{% for name, value in prometheus_target_labels.items() %}
    {{ name }}: '{{ value }}'
{% endfor %}