diff options
-rw-r--r-- | inventory/group_vars/chaos-at-home-ups/vars.yml | 2 | ||||
-rw-r--r-- | inventory/group_vars/ele-ups/vars.yml | 2 | ||||
-rw-r--r-- | inventory/host_vars/ch-mon.yml | 6 | ||||
-rw-r--r-- | roles/monitoring/prometheus/server/filter_plugins/prometheus.py | 2 |
4 files changed, 6 insertions, 6 deletions
diff --git a/inventory/group_vars/chaos-at-home-ups/vars.yml b/inventory/group_vars/chaos-at-home-ups/vars.yml index 4f003a7a..99868165 100644 --- a/inventory/group_vars/chaos-at-home-ups/vars.yml +++ b/inventory/group_vars/chaos-at-home-ups/vars.yml @@ -11,7 +11,7 @@ prometheus_scrape_endpoint: "{{ network_mgmt_zone.prefix | ipaddr(network_mgmt_z prometheus_exporters_default: - openwrt -prometheus_special_job_nut_ups: +prometheus_job_nut_ups: - exporter_hostname: ch-mon instance: "ups-{{ ups_name }}" ups: "{{ ups_name }}" diff --git a/inventory/group_vars/ele-ups/vars.yml b/inventory/group_vars/ele-ups/vars.yml index a57382ff..0d22f770 100644 --- a/inventory/group_vars/ele-ups/vars.yml +++ b/inventory/group_vars/ele-ups/vars.yml @@ -14,7 +14,7 @@ prometheus_scrape_endpoint: "{{ network_mgmt_zone.prefix | ipaddr(network_mgmt_z prometheus_exporters_default: - openwrt -prometheus_special_job_nut_ups: +prometheus_job_nut_ups: exporter_hostname: ele-mon instance: "ups-{{ ups_name }}" ups: "{{ ups_name }}" diff --git a/inventory/host_vars/ch-mon.yml b/inventory/host_vars/ch-mon.yml index 7d8e334b..a211d4bb 100644 --- a/inventory/host_vars/ch-mon.yml +++ b/inventory/host_vars/ch-mon.yml @@ -76,7 +76,7 @@ prometheus_exporter_blackbox_modules_extra: icmp: prober: icmp -prometheus_special_job_blackbox_ping: +prometheus_job_blackbox_ping: - exporter_hostname: ch-mon instance: "ping-magentagw" address: 62.99.185.129 @@ -84,12 +84,12 @@ prometheus_special_job_blackbox_ping: instance: "ping-quad9" address: 9.9.9.9 -prometheus_special_job_blackbox_https: +prometheus_job_blackbox_https: - exporter_hostname: ch-mon instance: "https-web.chaos-at-home.org" address: web.chaos-at-home.org -prometheus_special_job_blackbox_ssh: +prometheus_job_blackbox_ssh: - exporter_hostname: ch-mon instance: "ssh-{{ inventory_hostname }}" address: "{{ network_zones.svc.prefix | ipaddr(network_zones.svc.offsets[inventory_hostname]) | ipaddr('address') }}:{{ ansible_port | default(22) }}" diff --git a/roles/monitoring/prometheus/server/filter_plugins/prometheus.py b/roles/monitoring/prometheus/server/filter_plugins/prometheus.py index ab865f93..056d216f 100644 --- a/roles/monitoring/prometheus/server/filter_plugins/prometheus.py +++ b/roles/monitoring/prometheus/server/filter_plugins/prometheus.py @@ -11,7 +11,7 @@ def prometheus_job_targets(hostvars, jobs, targets): result = [] for job in jobs: for target in targets: - special_config_varname = 'prometheus_special_job_' + job.replace('-', '_') + special_config_varname = 'prometheus_job_' + job.replace('-', '_') if special_config_varname in hostvars[target]: for config in hostvars[target][special_config_varname]: result.append({'job': job, 'instance': config['instance'], 'config': config, 'enabled': True}) |