summaryrefslogtreecommitdiff
path: root/roles/monitoring/prometheus/exporter/register/templates/modbus/probe.yml.j2
blob: d450f53521e303bd30f35e0f2255f39c20afdb2b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
- targets: [ '{{ (target.exporter_hostname == prometheus_server) | ternary('127.0.0.1:9999', hostvars[target.exporter_hostname].prometheus_scrape_endpoint) }}' ]
  labels:
    instance: '{{ target.instance }}'
    modbus_instance: '{{ target.config.modbus_instance }}'
    __param_target: '{{ target.config.target }}'
    __param_sub_target: '{{ target.config.sub_target }}'
    __param_module: '{{ target.config.module }}'
{% for name, value in prometheus_target_labels.items() %}
    {{ name }}: '{{ value }}'
{% endfor %}