diff options
Diffstat (limited to 'roles/monitoring/prometheus/exporter/register/templates/modbus')
-rw-r--r-- | roles/monitoring/prometheus/exporter/register/templates/modbus/probe.yml.j2 | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/roles/monitoring/prometheus/exporter/register/templates/modbus/probe.yml.j2 b/roles/monitoring/prometheus/exporter/register/templates/modbus/probe.yml.j2 new file mode 100644 index 00000000..5d51398a --- /dev/null +++ b/roles/monitoring/prometheus/exporter/register/templates/modbus/probe.yml.j2 @@ -0,0 +1,9 @@ +- targets: [ '{{ (target.exporter_hostname == prometheus_server) | ternary('127.0.0.1:9999', hostvars[target.exporter_hostname].prometheus_scrape_endpoint) }}' ] + labels: + instance: '{{ target.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 %} |