summaryrefslogtreecommitdiff
path: root/inventory/group_vars/chaos-at-home-ups/vars.yml
blob: 2a67bb76e271e47ee7b90b3756c5bd658e902b1b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
---
network_mgmt_zone: "{{ network_zones.mgmt }}"

ups_name: "{{ inventory_hostname | regex_replace('^ch-ups-(.*)$', '\\1') }}"
ups_query_sources:
  - "{{ network_mgmt_zone.prefix | ansible.utils.ipaddr(network_mgmt_zone.offsets['ch-mon']) | ansible.utils.ipaddr('address') }}"
  - "{{ network_mgmt_zone.prefix | ansible.utils.ipaddr(network_mgmt_zone.offsets['ch-equinox-ws']) | ansible.utils.ipaddr('address') }}"


prometheus_scrape_endpoint: "{{ network_mgmt_zone.prefix | ansible.utils.ipaddr(network_mgmt_zone.offsets[inventory_hostname]) | ansible.utils.ipaddr('address') }}:9100"
prometheus_exporters_default:
  - openwrt

prometheus_job_multitarget_nut__ups:
  ch-mon:
  - instance: "ups-{{ ups_name }}"
    ups: "{{ ups_name }}"
    server: "{{ network_mgmt_zone.prefix | ansible.utils.ipaddr(network_mgmt_zone.offsets[inventory_hostname]) | ansible.utils.ipaddr('address') }}"