OPNsense Forum

English Forums => Tutorials and FAQs => Topic started by: Patrick M. Hausen on July 24, 2025, 11:40:10 AM

Title: HOWTO: monitor your SSD(s) with Scrutiny
Post by: Patrick M. Hausen on July 24, 2025, 11:40:10 AM
Hi all,

Scrutiny is a nice and lean HDD and SSD monitoring solution relying on smartmontools to gather health data. In case of SSDs and OPNsense most importantly the "Percentage Used" (NVMe) or "Percentage Used Endurance Indicator" (SATA) values.

This post does not cover how to install and run Scrutiny - you need a dedicated Linux system for that in addition to OPNsense. The recommended way is to simply start it in Docker. I do that on TrueNAS CE where it is available as an "app".


1. Install smartmontools

The easiest way is to install the os-smart plugin from System > Firmware > Plugins

2. Install the Scrutiny binary for FreeBSD

As root on OPNsense do:

cd /root
fetch https://github.com/AnalogJ/scrutiny/releases/download/v0.8.1/scrutiny-collector-metrics-freebsd-amd64
chmod 755 scrutiny-collector-metrics-freebsd-amd64

3. Create a wrapper shell script

Use an editor to create /root/run-scrutiny.sh with this content:

#!/bin/sh

cd /root && ./scrutiny-collector-metrics-freebsd-amd64 run --api-endpoint "http://### insert your Scrutiny URL here ###" --host-id "OPNsense" --log-file "scrutiny-collector.log" >/dev/null 2>&1

Make it executable:

chmod 755 /root/run-scrutiny.sh
4. Create a symlink to activate it as a daily periodic job

cd /usr/local/etc/periodic/daily
ln -s /root/run-scrutiny.sh scrutiny

5. Result

The stats will be updated every night at 3 am and in my case look like this:

(https://forum.opnsense.org/index.php?action=dlattach;attach=46454;image)

Clicking on the drive entry shows you all SMART attributes concerning the drive health in detail:

(https://forum.opnsense.org/index.php?action=dlattach;attach=46456;image)

So I know that I have used up 5% of the drive's guaranteed write endurance, for example.

---
Done - enjoy.
Patrick