diff options
author | Christian Pointner <equinox@spreadspace.org> | 2023-02-03 19:41:46 +0100 |
---|---|---|
committer | Christian Pointner <equinox@spreadspace.org> | 2023-02-03 19:41:46 +0100 |
commit | 9836d31c43d1c7a57ec67186c9809019079c147c (patch) | |
tree | 5e00d77e489e23d370aaebc8183ed4f6857da0e2 | |
parent | add promzone-test (diff) |
add openwrt testvm to prometheus test-zone
-rw-r--r-- | chaos-at-home/ch-testvm-prometheus.yml | 2 | ||||
-rw-r--r-- | inventory/group_vars/promzone-test/vars.yml | 1 | ||||
-rw-r--r-- | inventory/host_vars/ch-testvm-openwrt.yml | 18 | ||||
-rw-r--r-- | inventory/hosts.ini | 5 |
4 files changed, 23 insertions, 3 deletions
diff --git a/chaos-at-home/ch-testvm-prometheus.yml b/chaos-at-home/ch-testvm-prometheus.yml index 9a6c75a2..ed5e22da 100644 --- a/chaos-at-home/ch-testvm-prometheus.yml +++ b/chaos-at-home/ch-testvm-prometheus.yml @@ -14,8 +14,8 @@ - role: apt-repo/spreadspace - role: nginx/base - role: monitoring/prometheus/ca - - role: monitoring/prometheus/exporter - role: monitoring/prometheus/server #- role: monitoring/prometheus/alertmanager #- role: monitoring/grafana - role: monitoring/landingpage + - role: monitoring/prometheus/exporter diff --git a/inventory/group_vars/promzone-test/vars.yml b/inventory/group_vars/promzone-test/vars.yml index 83110df7..d44ec3e8 100644 --- a/inventory/group_vars/promzone-test/vars.yml +++ b/inventory/group_vars/promzone-test/vars.yml @@ -19,6 +19,7 @@ prometheus_alertmanager_version: 0.25.0 prometheus_server: ch-testvm-prometheus prometheus_server_jobs: - node + - openwrt - blackbox - blackbox/probe - ssl diff --git a/inventory/host_vars/ch-testvm-openwrt.yml b/inventory/host_vars/ch-testvm-openwrt.yml index 4e978fcf..6f89e0f8 100644 --- a/inventory/host_vars/ch-testvm-openwrt.yml +++ b/inventory/host_vars/ch-testvm-openwrt.yml @@ -38,6 +38,8 @@ openwrt_packages_add: - iperf - iperf3 - mtr + - prometheus-node-exporter-lua + - prometheus-node-exporter-lua-openwrt openwrt_mixin: /etc/dropbear/authorized_keys: @@ -79,6 +81,17 @@ openwrt_uci: RootPasswordAuth: 'off' Port: '{{ ansible_port | default(22) }}' + uhttpd: + - name: uhttpd main + options: + enabled: '0' + + prometheus-node-exporter-lua: + - name: prometheus-node-exporter-lua 'main' + options: + listen_interface: 'svc' + listen_port: '9100' + network: - name: globals 'globals' options: @@ -106,3 +119,8 @@ openwrt_uci: target: "{{ network_zones.lan.prefix | ansible.utils.ipaddr('network') }}" netmask: "{{ network_zones.lan.prefix | ansible.utils.ipaddr('netmask') }}" gateway: "{{ network_zones.svc.prefix | ansible.utils.ipaddr(network_zones.svc.offsets['ch-gw-lan']) | ansible.utils.ipaddr('address') }}" + + +prometheus_scrape_endpoint: "{{ network_zones.svc.prefix | ansible.utils.ipaddr(network_zones.svc.offsets[inventory_hostname]) | ansible.utils.ipaddr('address') }}:9100" +prometheus_exporters_default: + - openwrt diff --git a/inventory/hosts.ini b/inventory/hosts.ini index 21b31e3c..9e857228 100644 --- a/inventory/hosts.ini +++ b/inventory/hosts.ini @@ -15,7 +15,6 @@ env_group=chaos-at-home [chaos-at-home] ch-phoebe host_name=phoebe ch-testvm-phoebe host_name=testvm-phoebe -ch-testvm-openwrt host_name=testvm-openwrt ch-router host_name=router ch-router-obsd host_name=router ch-gw-lan host_name=gw-lan @@ -30,6 +29,7 @@ ch-imap-proxy host_name=imap-proxy ch-auth-legacy host_name=auth ch-prometheus-legacy host_name=prometheus ch-testvm-prometheus host_name=testvm-prometheus +ch-testvm-openwrt host_name=testvm-openwrt ch-installsmb host_name=installsmb ch-iot host_name=iot ch-vpn host_name=vpn @@ -337,7 +337,6 @@ sk-tomnext-hp ## virtualization [vmhost-ch-phoebe-guests] ch-testvm-phoebe -ch-testvm-openwrt ch-router ch-router-obsd ch-jump @@ -355,6 +354,7 @@ ch-imap-proxy ch-auth-legacy ch-prometheus-legacy ch-testvm-prometheus +ch-testvm-openwrt ch-iot ch-vpn ch-mon @@ -464,6 +464,7 @@ promzone-elevate-festival-server ch-testvm-prometheus [promzone-test] ch-testvm-phoebe +ch-testvm-openwrt [promzone-test:children] promzone-test-server |