From 6d9ebd179f7fc39101a7bd29daba4bfe9653439d Mon Sep 17 00:00:00 2001 From: Christian Pointner Date: Fri, 22 Jul 2022 21:14:58 +0200 Subject: elevate: clean up some old hosts --- inventory/host_vars/ch-alix1d.yml | 70 ++++++++++++++++++++++++++++++++++----- 1 file changed, 62 insertions(+), 8 deletions(-) (limited to 'inventory/host_vars/ch-alix1d.yml') diff --git a/inventory/host_vars/ch-alix1d.yml b/inventory/host_vars/ch-alix1d.yml index e28d1018..9e579648 100644 --- a/inventory/host_vars/ch-alix1d.yml +++ b/inventory/host_vars/ch-alix1d.yml @@ -8,17 +8,12 @@ openwrt_output_image_suffixes: openwrt_packages_remove: - ppp - ppp-mod-pppoe + - kmod-ppp + - kmod-pppoe + - kmod-pppox - firewall - dnsmasq - odhcpd-ipv6only - - linux-atm - - kmod-pppoa - - kmod-mppe - - ppp-mod-pppoa - - pppstats - - pppdump - - iwinfo - - soloscli openwrt_packages_add: - kmod-e100 - kmod-usb-serial-option @@ -32,6 +27,9 @@ openwrt_packages_add: - iperf3 - mtr - iptraf-ng + - prometheus-node-exporter-lua + - prometheus-node-exporter-lua-netstat + - prometheus-node-exporter-lua-openwrt - usbutils - usb-modeswitch - smstools3 @@ -44,6 +42,39 @@ openwrt_mixin: /etc/htoprc: file: "{{ global_files_dir }}/common/htoprc" + /etc/rc.d/S95sachet: + link: "../init.d/sachet" + + /etc/init.d/sachet: + mode: "0755" + content: | + #!/bin/sh /etc/rc.common + + START=95 + USE_PROCD=1 + + start_service() { + procd_open_instance + + procd_set_param command /root/sachet -config /etc/sachet.yml + procd_set_param respawn + procd_set_param stdout 1 + + procd_close_instance + } + + /etc/sachet.yml: + content: | + providers: + smstools: + outgoing_dir: /var/spool/sms/outgoing + + receivers: + - name: 'equinox-sms' + provider: 'smstools' + to: + - '+436644800222' + /etc/usb-mode.json: content: | { @@ -106,6 +137,13 @@ openwrt_uci: - '2.at.pool.ntp.org' - '3.at.pool.ntp.org' + prometheus-node-exporter-lua: + - name: prometheus-node-exporter-lua 'main' + options: + listen_interface: 'lan' + listen_ipv6: '0' + listen_port: '9100' + dropbear: - name: dropbear options: @@ -138,3 +176,19 @@ openwrt_uci: options: device: eth1 proto: none + + +prometheus_scrape_endpoint: "{{ network_zones.lan.prefix | ipaddr(network_zones.lan.offsets[inventory_hostname]) | ipaddr('address') }}:9100" +prometheus_exporters_default: + - openwrt + + +### TODO: +# +# git clone github:spreadspace/sachet +# git checkout topic/add-smstools +# cd sachet/cmd/sachet +# export GOARCH=386 +# export GO386=softfloat +# go build -a -installsuffix cgo -mod vendor -o ../../sachet . +# scp ../../sachet ch-alix1d:/root/sachet -- cgit v1.2.3