summaryrefslogtreecommitdiff
path: root/inventory/host_vars/ch-gw-c3voc.yml
diff options
context:
space:
mode:
Diffstat (limited to 'inventory/host_vars/ch-gw-c3voc.yml')
-rw-r--r--inventory/host_vars/ch-gw-c3voc.yml19
1 files changed, 19 insertions, 0 deletions
diff --git a/inventory/host_vars/ch-gw-c3voc.yml b/inventory/host_vars/ch-gw-c3voc.yml
index ec85f56c..3da27bf7 100644
--- a/inventory/host_vars/ch-gw-c3voc.yml
+++ b/inventory/host_vars/ch-gw-c3voc.yml
@@ -42,6 +42,9 @@ openwrt_packages_add:
- iperf3
- mtr
- iptraf-ng
+ - prometheus-node-exporter-lua
+ - prometheus-node-exporter-lua-netstat
+ - prometheus-node-exporter-lua-openwrt
openwrt_mixin:
/etc/dropbear/authorized_keys:
@@ -88,6 +91,7 @@ openwrt_mixin:
ip protocol icmp accept
ip6 nexthdr ipv6-icmp accept
tcp dport { {{ ansible_port }} } accept
+ ip saddr {{ network_zones.svc.prefix | ansible.utils.ipaddr(network_zones.svc.offsets[prometheus_server]) | ansible.utils.ipaddr('address') }} tcp dport 9100 accept
}
chain input_c3voc {
@@ -147,6 +151,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:
@@ -181,3 +196,7 @@ 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