Installing Scrutiny on QNAP QTS NAS
Scrutiny is an interesting tool which lets you collect SMART data from your hard drives, visualize them in a pretty web UI, and predict failures with Backblaze's wonderful backlog of real world data that they've been collecting for many years at this point.
This appealed to me because I'm in the process of moving data off my QNAP array, and onto something a little more hands on. I connected my QNAP TR-004 USB drive enclosure to my server, and was able to get Scrutiny working thanks to this guide.
It's important to mention that support for the chip which QNAP uses in that USB enclosure was only recently added in smartmontools 7.2. I say recently even though it's been a few years at this point, but finding compiled binaries for your QNAP on your architecture might be kinda difficult. Entware-ng seems to be the way people get 3rd party packages on their QNAPs, but their version of smartmontools is out of date. In my case, my QNAP is x86, so I think all I really needed was a statically compiled binary, but everything else is above my head.
First, I installed entware:
wget -O - https://bin.entware.net/x64-k3.2/installer/generic.sh | /bin/sh
Then, I installed smartmontools 7.4:
opkg install smartmontools
Then, I followed Scrutiny's guide on manual installation, which mostly went without a hitch. We're just trying to run the collector on the QNAP. If you can run Docker and can pass through the drives, please avoid all this pain and use their Docker guides.
I did need to manually specify the drives as sat
. That would look like this if you were just using smartctl: smartctl -d sat -a /dev/sda
.
Here's what my collector.yaml looks like:
version: 1
host:
id: "qnap"
# Auto config works for me for NVMe SSDs, but not drives.
devices:
- device: /dev/sda
type: sat
- device: /dev/sdb
type: sat
- device: /dev/sdc
type: sat
- device: /dev/sdd
type: sat
- device: /dev/sde
type: sat
- device: /dev/sdf
type: sat
- device: /dev/sdg
type: sat
- device: /dev/sdh
type: sat
- device: /dev/sdi
type: sat
- device: /dev/sdj
type: sat
- device: /dev/sdk
type: sat
- device: /dev/sdl
type: sat
# Not sure if path would be correct on QNAP QTS
commands:
metrics_smartctl_bin: '/opt/sbin/smartctl'