`docker start host-agent` failed on unraid-1 with: Error response from daemon: path / is mounted on / but it is not a shared or slave mount Unraid's root filesystem mount has "private" propagation by default and rejects rslave from a container's volume spec. The static view of host mounts (without rslave) is fine for an unraid box where the array is mounted before host-agent starts — we lose the ability to see *future* host mounts inside the container, which we never use anyway. Container stays in Created state until this is fixed: user runs install.sh + re-Applies my-host-agent template in Unraid UI.
63 lines
5.6 KiB
XML
63 lines
5.6 KiB
XML
<?xml version="1.0"?>
|
|
<!--
|
|
Unraid Community Apps template for host-agent (per-host metrics + fan ctrl).
|
|
Source of truth: pq/scripts on Gitea (https://git.docker.pq.io/pq/scripts).
|
|
Served via gitea raw URL: https://git.docker.pq.io/pq/scripts/raw/branch/main/unraid-1/host-agent.template.xml
|
|
|
|
This file is NOT installed directly. install.sh fetches it and writes it to
|
|
/boot/config/plugins/dockerMan/templates-user/my-host-agent.xml. No secrets
|
|
to substitute.
|
|
|
|
host-agent is one container bundling: fan-controller (Dell PowerEdge only —
|
|
self-disables on consumer hardware like unraid), node_exporter, cadvisor,
|
|
ipmi_exporter, smartctl_exporter, nvidia_gpu_exporter, vmagent (remote_write
|
|
to Prometheus). Each sub-service probes its prerequisites on start and
|
|
sleep-infinity's if absent, so the same image runs on a Dell R730xd and an
|
|
unraid box on consumer hardware.
|
|
|
|
On unraid-1: fan-controller + ipmi_exporter + nvidia_gpu_exporter self-
|
|
disable (no Dell BMC, no nvidia GPU). node + cadvisor + smartctl + vmagent
|
|
run, ship metrics to monitoring stack on classe.
|
|
-->
|
|
<Container version="2">
|
|
<Name>host-agent</Name>
|
|
<Repository>ghcr.io/mattjackson/host-agent:latest</Repository>
|
|
<Registry>https://github.com/mattjackson/host-agent</Registry>
|
|
<Network>host</Network>
|
|
<MyIP/>
|
|
<Shell>sh</Shell>
|
|
<Privileged>true</Privileged>
|
|
<Support/>
|
|
<Project>https://github.com/mattjackson/host-agent</Project>
|
|
<Overview>Per-host Prometheus exporters (node, cadvisor, ipmi, smartctl, nvidia-gpu) plus Dell PowerEdge fan controller. Each sub-service self-disables if hardware prerequisites are missing — same image runs on Dell servers and consumer Unraid hardware.</Overview>
|
|
<Category>Tools: Status: Productivity:</Category>
|
|
<WebUI/>
|
|
<TemplateURL/>
|
|
<Icon>https://raw.githubusercontent.com/prometheus/prometheus/main/web/ui/static/img/prometheus_logo_grey.svg</Icon>
|
|
<ExtraParams>--restart=unless-stopped --cgroupns=host -v /:/host:ro --label com.centurylinklabs.watchtower.enable=true</ExtraParams>
|
|
<PostArgs/>
|
|
<CPUset/>
|
|
<DateInstalled/>
|
|
<DonateText/>
|
|
<DonateLink/>
|
|
<Description>
|
|
host-agent: single container, s6-supervised, bundles per-host metrics + Dell fan control.
|
|
|
|
On unraid-1 (consumer hardware): fan-controller + ipmi_exporter + nvidia_gpu_exporter self-disable. node_exporter (CPU/mem/disk/net), cadvisor (per-container), smartctl_exporter (drive SMART), and vmagent (remote_write) run and push to your Prometheus.
|
|
|
|
The root mount (/:/host:ro) is wired via ExtraParams since Unraid's Path config doesn't expose `-v` syntax. rslave propagation was dropped because Unraid's root mount is "private" by default and rejects rslave with "path / is mounted on / but it is not a shared or slave mount"; static-view is fine for an Unraid box where the array is mounted before the container starts.
|
|
</Description>
|
|
|
|
<Config Name="/sys" Target="/sys" Default="/sys" Mode="ro" Description="Required: cadvisor reads /sys/fs/cgroup directly (its own cgroup ns is just /, even with --privileged)." Type="Path" Display="advanced" Required="true" Mask="false">/sys</Config>
|
|
<Config Name="docker.sock" Target="/run/docker.sock" Default="/var/run/docker.sock" Mode="rw" Description="Required: cadvisor opens /run/docker.sock at this hardcoded path for container metadata." Type="Path" Display="advanced" Required="true" Mask="false">/var/run/docker.sock</Config>
|
|
<Config Name="containerd" Target="/run/containerd" Default="/run/containerd" Mode="ro" Description="Required: cadvisor opens /run/containerd/containerd.sock at this hardcoded path." Type="Path" Display="advanced" Required="true" Mask="false">/run/containerd</Config>
|
|
<Config Name="/var/lib/docker" Target="/var/lib/docker" Default="/var/lib/docker" Mode="ro" Description="Required: cadvisor reads container metadata from here." Type="Path" Display="advanced" Required="true" Mask="false">/var/lib/docker</Config>
|
|
<Config Name="/dev" Target="/dev" Default="/dev" Mode="rw" Description="Required: ipmitool + smartctl hardcode /dev/* paths and Docker doesn't auto-import host devices." Type="Path" Display="advanced" Required="true" Mask="false">/dev</Config>
|
|
<Config Name="host-agent state" Target="/var/lib/host-agent" Default="/mnt/user/appdata/host-agent" Mode="rw" Description="Persistent state: fan-controller EWMA baseline + vmagent WAL." Type="Path" Display="always" Required="true" Mask="false">/mnt/user/appdata/host-agent</Config>
|
|
|
|
<Config Name="PROMETHEUS_REMOTE_WRITE_URL" Target="PROMETHEUS_REMOTE_WRITE_URL" Default="http://docker-1.internal.pq.io:9090/api/v1/write" Mode="" Description="Where vmagent pushes metrics. Defaults to monitoring stack on classe (docker-1). Prometheus must be started with --web.enable-remote-write-receiver (already is)." Type="Variable" Display="always" Required="true" Mask="false">http://docker-1.internal.pq.io:9090/api/v1/write</Config>
|
|
<Config Name="PROMETHEUS_REMOTE_WRITE_BEARER_TOKEN" Target="PROMETHEUS_REMOTE_WRITE_BEARER_TOKEN" Default="" Mode="" Description="Optional bearer token for remote_write auth (LAN-internal Prometheus typically needs none)." Type="Variable" Display="advanced" Required="false" Mask="true"/>
|
|
<Config Name="NVIDIA_VISIBLE_DEVICES" Target="NVIDIA_VISIBLE_DEVICES" Default="all" Mode="" Description="Harmless if no NVIDIA driver — nvidia_gpu_exporter sub-service self-disables." Type="Variable" Display="advanced" Required="false" Mask="false">all</Config>
|
|
<Config Name="NVIDIA_DRIVER_CAPABILITIES" Target="NVIDIA_DRIVER_CAPABILITIES" Default="utility" Mode="" Description="Harmless if no NVIDIA driver." Type="Variable" Display="advanced" Required="false" Mask="false">utility</Config>
|
|
</Container>
|