here is a mini guide to setup scrutiny for docker (i used jailmaker) in truenas
i’m assuming you already setup docker, and know how to deploy either with dockge or other methods.
This is my working docker compose
services:
scrutiny:
container_name: scrutiny
image: ghcr.io/analogj/scrutiny:master-omnibus
cap_add:
- SYS_RAWIO
- SYS_ADMIN
# environment:
# - COLLECTOR_CRON_SCHEDULE="0 0 * * *"
ports:
- 6180:8080 # webapp
- 6186:8086 # influxDB admin
volumes:
- /run/udev:/run/udev:ro
- /mnt/docker/data/scrutiny/config:/opt/scrutiny/config
- /mnt/docker/data/scrutiny/influxdb:/opt/scrutiny/influxdb
devices:
- /dev/sda
- /dev/sdb
- /dev/sdc
- /dev/sdd
- /dev/nvme2n1
- /dev/nvme0n1
- /dev/nvme1n1
restart: unless-stopped
networks: {}
change the sda … nvme… to match your hdds and ssds. to find that out, go to truenas ui > storage > disks. All the names should be there
note: drive names can change if you add other drives, take something out, or even plug in a usb device in the ports on your nas.
or, you can go to truenas shell and do a sudo smartctl --scan
which will list them all out. not to mention it confirms your drives are detected.
Next you need to add a collector.yaml file located in your scrutiny/config
folder.
This is what i use. it lists all the hdds and nvmes in my nas
devices:
- device: /dev/sda
type: 'sat'
- device: /dev/sdb
type: 'sat'
- device: /dev/sdc
type: 'sat'
- device: /dev/sdd
type: 'sat'
- device: /dev/nvme2n1
type: 'nvme'
- device: /dev/nvme0n1
type: 'nvme'
- device: /dev/nvme1n1
type: 'nvme'
this folder also has a scrutiny.db
file. i think its generated as u deploy the compose. but if not, then try create an empty file for it.
in another folder, scrutiny/influxdb
there is a config.yaml
bolt-path: /opt/scrutiny/influxdb/influxd.bolt
engine-path: /opt/scrutiny/influxdb/engine
http-bind-address: ":8086"
reporting-disabled: true
there are 2 files in this folder as well, influxd.bolt
and influxd.sqlite
If when you try to deploy scrutiny via dockge, but it doesn’t create these files, try create them manually with notepad with file type all, blank.
assuming you are using jailmaker to deploy your docker, you have a step requiring to modify the jailmaker config. so stop your jail first. then modify the jailmaker config e.g. jlmkr edit docker
*docker is what i named my jail
then edit this line. basically just below the bpf, add the capability line
--system-call-filter='add_key keyctl bpf'
--capability='CAP_SYS_RAWIO,CAP_SYS_ADMIN'
you also need to add this to make your hdds and ssds accessible. modify accordingly to your own
--bind-ro=/dev/sda
--bind-ro=/dev/sdb
--bind-ro=/dev/sdc
--bind-ro=/dev/sdd
--bind-ro=/dev/nvme2n1
--bind-ro=/dev/nvme0n1
--bind-ro=/dev/nvme1n1
At this point you can start your jail, truenas shell, jlmkr start docker
go to dockge, deploy that docker compose we setup earlier. it you did it correctly, it will deploy without issue. then you can click the port number in dockge to pop up the browser to view your scrutiny ui for smart status.
Enjoy
PS: this guide is just for a basic config for ssd/hdds without usage of hba pcie addon cards (refer to github for support for that config). There is a lot more u can tinker, all listed on the analogj github for scrutiny.
also if you are using scrutiny using truenas native docker, you might not need to do the capability stuff. i’m not sure but it should be full access ya?