52 lines
1.4 KiB
Markdown
52 lines
1.4 KiB
Markdown
# installation
|
|
|
|
1. open the add-ons panel in Home Assistant: `Settings-->Add-ons-->Add-on Store`
|
|
2. click the menu icon in the top-right, then click "repositories"
|
|
3. add the url to this repo
|
|
|
|
## notes
|
|
|
|
cadvisor and node exporter are inaccurate or missing critical metrics because
|
|
hassos doesn't allow add-ons to mount important host directories like /sys
|
|
and the root directory, which are needed for proper monitoring
|
|
|
|
in the meantime, one can run them directly in hassos by ssh-ing into the base
|
|
container (with the help of the ssh add-on) with the following commands
|
|
|
|
### node exporter
|
|
|
|
```sh
|
|
docker run \
|
|
--volume=/:/rootfs:ro \
|
|
--volume=/sys:/host/sys:ro \
|
|
--volume=/proc:/host/proc:ro \
|
|
--volume=/:/host:ro,rslave \
|
|
--name=node-exporter \
|
|
--detach=true \
|
|
--net="host" \
|
|
--pid="host" \
|
|
quay.io/prometheus/node-exporter:v1.9.1 \
|
|
--path.rootfs=/host \
|
|
--path.procfs=/host/proc \
|
|
--path.sysfs=/host/sys \
|
|
'--collector.filesystem.mount-points-exclude=^/(sys|proc|dev|host|etc|var/lib/docker|var/log/journal)($$|/)' \
|
|
'--collector.netdev.device-exclude=^(veth.*)$$'
|
|
```
|
|
|
|
### cadvisor
|
|
|
|
```sh
|
|
docker run \
|
|
--volume=/:/rootfs:ro \
|
|
--volume=/var/run:/var/run:ro \
|
|
--volume=/sys:/sys:ro \
|
|
--volume=/var/lib/docker/:/var/lib/docker:ro \
|
|
--publish=8080:8080 \
|
|
--detach=true \
|
|
--name=cadvisor \
|
|
--privileged \
|
|
gcr.io/cadvisor/cadvisor:v0.52.1 \
|
|
-docker_only=true \
|
|
-housekeeping_interval=30s
|
|
```
|