diff options
Diffstat (limited to 'roles/monitoring/prometheus/exporter/register/templates/nut')
-rw-r--r-- | roles/monitoring/prometheus/exporter/register/templates/nut/ups.yml.j2 | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/roles/monitoring/prometheus/exporter/register/templates/nut/ups.yml.j2 b/roles/monitoring/prometheus/exporter/register/templates/nut/ups.yml.j2 new file mode 100644 index 00000000..a25cdfe5 --- /dev/null +++ b/roles/monitoring/prometheus/exporter/register/templates/nut/ups.yml.j2 @@ -0,0 +1,17 @@ +- targets: [ '{{ (target.exporter_hostname == prometheus_server) | ternary('127.0.0.1:9999', hostvars[target.exporter_hostname].prometheus_scrape_endpoint) }}' ] + labels: + instance: '{{ target.instance }}' + __param_ups: '{{ target.config.ups }}' + __param_server: '{{ target.config.server | default('127.0.0.1') }}' +{% if 'username' in target.config %} + __param_username: '{{ target.config.username }}' +{% endif %} +{% if 'password' in target.config %} + __param_password: '{{ target.config.password }}' +{% endif %} +{% if 'variables' in target.config %} + __param_variables: '{{ target.config.variables }}' +{% endif %} +{% if 'statuses' in target.config %} + __param_statuses: '{{ target.config.statuses }}' +{% endif %} |