diff --git a/hosts/ps08rp/node-exporter/compose.yaml b/hosts/ps08rp/node-exporter/compose.yaml index 596479c7d..c6077f1e9 100644 --- a/hosts/ps08rp/node-exporter/compose.yaml +++ b/hosts/ps08rp/node-exporter/compose.yaml @@ -1,11 +1,17 @@ --- services: - node_exporter: + node-exporter: image: quay.io/prometheus/node-exporter:v1.9.0 - container_name: node_exporter + container_name: node-exporter command: - - '--path.rootfs=/host' + - '--path.procfs=/host/proc' + - '--path.rootfs=/rootfs' + - '--path.sysfs=/host/sys' + ports: + - 9100:9100 pid: host restart: always volumes: - - '/:/host:ro,rslave' + - /proc:/host/proc:ro + - /sys:/host/sys:ro + - /:/rootfs:ro diff --git a/hosts/ps09rp/node-exporter/compose.yaml b/hosts/ps09rp/node-exporter/compose.yaml index 596479c7d..c6077f1e9 100644 --- a/hosts/ps09rp/node-exporter/compose.yaml +++ b/hosts/ps09rp/node-exporter/compose.yaml @@ -1,11 +1,17 @@ --- services: - node_exporter: + node-exporter: image: quay.io/prometheus/node-exporter:v1.9.0 - container_name: node_exporter + container_name: node-exporter command: - - '--path.rootfs=/host' + - '--path.procfs=/host/proc' + - '--path.rootfs=/rootfs' + - '--path.sysfs=/host/sys' + ports: + - 9100:9100 pid: host restart: always volumes: - - '/:/host:ro,rslave' + - /proc:/host/proc:ro + - /sys:/host/sys:ro + - /:/rootfs:ro diff --git a/hosts/ps10rp/node-exporter/compose.yaml b/hosts/ps10rp/node-exporter/compose.yaml new file mode 100644 index 000000000..3e29ecb0a --- /dev/null +++ b/hosts/ps10rp/node-exporter/compose.yaml @@ -0,0 +1,32 @@ +--- +services: + tailscale-node-exporter: + image: ghcr.io/tailscale/tailscale:v1.80.0 + container_name: tailscale-node-exporter + cap_add: + - net_admin + - sys_module + environment: + - TS_STATE_DIR=/var/lib/tailscale + - TS_ENABLE_METRICS=true + - TS_HOSTNAME=node-exporter-ps10rp + network_mode: service:node-exporter + restart: always + volumes: + - tailscale:/var/lib/tailscale + devices: + - /dev/net/tun:/dev/net/tun + + node-exporter: + image: quay.io/prometheus/node-exporter:v1.9.0 + container_name: node-exporter + command: + - '--path.procfs=/host/proc' + - '--path.rootfs=/rootfs' + - '--path.sysfs=/host/sys' + pid: host + restart: always + volumes: + - /proc:/host/proc:ro + - /sys:/host/sys:ro + - /:/rootfs:ro diff --git a/hosts/ps10rp/node-exporter/serve.json b/hosts/ps10rp/node-exporter/serve.json new file mode 100644 index 000000000..64b464f28 --- /dev/null +++ b/hosts/ps10rp/node-exporter/serve.json @@ -0,0 +1,16 @@ +{ + "TCP": { + "443": { + "HTTPS": true + } + }, + "Web": { + "${TS_CERT_DOMAIN}:443": { + "Handlers": { + "/metrics": { + "Proxy": "http://127.0.0.1:9100" + } + } + } + } +}