Skip to content
ES EN
Theme: automatic

Lab · Storage

Watch your NAS disk health with Scrutiny on Docker Compose

Deploy Scrutiny v0.10.0 with Docker Compose: S.M.A.R.T. dashboard, collector, Shoutrrr alerts, config backup and a full teardown.

Lab · Storage

40 min intermediate level validated configuration

Lab architectureComponents: Browser, Scrutiny omnibus, Collector + smartctl, InfluxDB, NAS disks, Notification service.HTTPS.M.A.R.T.APItime seriesShoutrrr URLBrowser: step 3Browserdashboard at 127.0.0.1:…Collector + smartctl: step 2Collector + smartc…inside the containerScrutiny omnibus: step 3Scrutiny omnibuscontainer :8080, v0.10.0NAS disks: step 1NAS disks/dev/sda, /dev/sdbInfluxDB: step 3InfluxDBbuilt into the containerNotification service: step 2Notification servi…Shoutrrr (ntfy, Telegra…
  1. Browser · step 3 dashboard at 127.0.0.1:8080
  2. Scrutiny omnibus · step 3 container :8080, v0.10.0
  3. Collector + smartctl · step 2 inside the container
  4. InfluxDB · step 3 built into the container
  5. NAS disks · step 1 /dev/sda, /dev/sdb
  6. Notification service · step 2 Shoutrrr (ntfy, Telegram…)

What you will build and why

A RAID or snapshots protect you after a disk has already failed; S.M.A.R.T. is how you find out it is about to fail. The catch: smartd keeps no history, does not tell critical attributes from informational ones, and has no web interface. Scrutiny fixes that with a dashboard that collects smartctl data, stores it as a time series and compares it against real-world failure rates.

In this lab you will run the omnibus image (web dashboard, collector and InfluxDB in a single container) with Docker Compose and a pinned version, tune the collector, set up Shoutrrr alerts, back up the configuration and learn how to remove everything. We pin v0.10.0, the latest listed in the release notes, because it is the one that documents the global notify keys we will use. These are instructions to follow on your own Linux machine; adapt the /dev/sdX devices to your disks.

Lab: Watch your NAS disk health with Scrutiny on Docker Compose

Requirements

SystemLinux (Debian 12 / Ubuntu 24.04) with accessible SATA/SAS disks
Docker Engine28.5.2
Docker Compose5.7.1
Scrutiny (imagen omnibus, incluye smartctl)v0.10.0
curl8.21.0
RAM2 GB
Disk5 GB

Step by step

  1. Identify your disks and prepare the directories

    Scrutiny detects disks with smartctl --scan, but the container can only read them if you pass each device with --device (in Compose, the devices key). So first you need to know which devices your machine has. If you use controller-based RAID, also pass the devices that smartctl --scan shows on your host.

    Also create the folders that will persist the configuration and the InfluxDB data. Without volumes, you would lose the history when the container is recreated.

    lsblk -d -o NAME,SIZE,MODEL
    mkdir -p ~/scrutiny/config ~/scrutiny/influxdb
    cd ~/scrutiny

    Expected output (illustrative: the exact format may vary)

    NAME   SIZE MODEL
    sda    3.6T WDC WD40EFRX-68N
    sdb    3.6T WDC WD40EFRX-68N
  2. Write the collector and alert configuration

    Write the configuration files before starting the container, so the service reads them from the very first boot. The default directory for both is /opt/scrutiny/config, which with our volume is ~/scrutiny/config.

    In collector.yaml you decide which disks to watch (allow_listed_devices; if you omit it, every detected disk is collected) and you can force a device type or ignore disks with the devices key. You do not invent the alert thresholds: Scrutiny combines manufacturer values with real-world failure rates and highlights critical attributes in the dashboard.

    In scrutiny.yaml, notify.urls accepts Shoutrrr URLs. With on_missed_upload you get an alert if a disk stops reporting, upload_period sets how often you expect data (0s estimates it from recent uploads), and on_smartctl_error alerts you if smartctl fails. These global keys appear in the v0.10.0 line, which is why we pin that version. Replace CHANGE_ME_NTFY_TOPIC with a hard-to-guess topic on your ntfy service (or use another Shoutrrr URL); do not publish that URL, because it works like a credential.

    File config/collector.yaml

    version: 1
    
    host:
      id: 'nas-casa'
    
    allow_listed_devices:
      - /dev/sda
      - /dev/sdb
    
    log:
      level: INFO

    File config/scrutiny.yaml

    version: 1
    
    web:
      listen:
        port: 8080
        host: 0.0.0.0
      database:
        location: /opt/scrutiny/config/scrutiny.db
      src:
        frontend:
          path: /opt/scrutiny/web
    
    log:
      level: INFO
    
    notify:
      on_missed_upload: true
      upload_period: 0s
      on_smartctl_error: true
      urls:
        - ntfy://ntfy.sh/CHANGE_ME_NTFY_TOPIC

    Replace every CHANGE_ME_… value with your own before starting: never keep example passwords or keys.

  3. Write the Compose file with a pinned version and start it

    The project warns that latest- tags can update the image without notice, and it publishes semver tags such as v0.10.0-omnibus. We pin that one. The dashboard (8080) is published only on 127.0.0.1: if you want to open it to your network, put a reverse proxy with authentication in front. We do not publish InfluxDB's 8086 because nothing outside the container needs it.

    A read-only /run/udev gives the collector device metadata, and SYS_RAWIO lets smartctl query S.M.A.R.T. data. Adjust the devices list to your disks. If you have NVMe drives, the documentation also asks for SYS_ADMIN and for passing their device (the one smartctl --scan shows); add them to allow_listed_devices too.

    After docker compose up -d, data collection happens on its own; check the logs to confirm it starts without errors.

    File compose.yaml

    services:
      scrutiny:
        image: ghcr.io/analogj/scrutiny:v0.10.0-omnibus
        container_name: scrutiny
        restart: unless-stopped
        ports:
          - "127.0.0.1:8080:8080"
        cap_add:
          - SYS_RAWIO
        volumes:
          - ./config:/opt/scrutiny/config
          - ./influxdb:/opt/scrutiny/influxdb
          - /run/udev:/run/udev:ro
        devices:
          - "/dev/sda"
          - "/dev/sdb"
    docker compose up -d
    docker compose ps
    docker compose logs --tail 30 scrutiny

    Expected output (illustrative: the exact format may vary)

    NAME       IMAGE                                     COMMAND   SERVICE    CREATED          STATUS          PORTS
    scrutiny   ghcr.io/analogj/scrutiny:v0.10.0-omnibus  "/init"   scrutiny   10 seconds ago   Up 9 seconds    127.0.0.1:8080->8080/tcp
  4. Open the dashboard and check your disks

    Open http://127.0.0.1:8080 in your browser. If the NAS has no screen, open an SSH tunnel to port 8080 instead of exposing it. Disks appear after the collector's first run; if the dashboard is still empty after a few minutes, see the troubleshooting section.

    If you later edit collector.yaml or scrutiny.yaml, docker compose restart scrutiny is enough for the container to re-read those files; a change to compose.yaml (devices, ports, tag) requires running docker compose up -d again.

    docker compose restart scrutiny
    docker compose logs --tail 30 scrutiny
  5. Back up the configuration

    What you cannot regenerate is the configuration and the history. With our volumes everything lives in ~/scrutiny/config (it includes scrutiny.yaml, collector.yaml and the scrutiny.db database) and in ~/scrutiny/influxdb (time series). For a consistent copy, stop the service for a few seconds, archive, and start it again.

    The data files are created by the container and may belong to root, which is why tar runs with sudo. Store the resulting archive on another disk or machine, not on one you are monitoring, and remember that scrutiny.yaml contains the URL with your alert topic.

    docker compose stop scrutiny
    sudo tar -czf ~/scrutiny-backup-$(date +%F).tar.gz -C ~ scrutiny/config scrutiny/influxdb
    docker compose start scrutiny

Check that it works

  1. The container is running and the dashboard responds

    Check the status with Compose and request only the dashboard's HTTP status code; it should return 200.

    docker compose ps
    curl -s -o /dev/null -w '%{http_code}\n' http://127.0.0.1:8080

    Expected output (illustrative: the exact format may vary)

    200
  2. The disks show up with data

    In the dashboard you should see each disk with its status and temperature. If one is missing, check the container logs.

    docker compose logs --tail 30 scrutiny
If something fails

The dashboard is empty, with no disks.

Read the logs with docker compose logs scrutiny. Usually the disk's devices entry is missing from the Compose file, or SYS_RAWIO is missing from cap_add. Check the list with smartctl --scan on the host and pass every device it shows.

A disk shows incomplete data or is not detected (RAID, USB adapters).

Automatic detection can fail with some controllers. Force the type in collector.yaml with the devices key and type, for example sat, and restart the service.

NVMe drives do not appear.

According to the documentation, NVMe also requires adding the SYS_ADMIN capability. Pass the NVMe device that smartctl --scan shows in devices and add it to allow_listed_devices.

Notifications do not arrive.

Check that the URL in notify.urls is valid for Shoutrrr and that, if the user or password contain special characters, they are URL-encoded. Restart the service after editing the file and look at docker compose logs.

Harden the setup

Do not expose the dashboard without authentication

The Compose file publishes 8080 only on 127.0.0.1. If you need remote access, use an SSH tunnel or a reverse proxy with authentication; do not open this port to the internet.

Keep privileges to a minimum

Pass only the devices you want to monitor and add SYS_ADMIN only if you have NVMe. Avoid privileged mode.

Protect the configuration and pin versions

The alert URL works like a credential: do not push it to repositories and limit who can read ~/scrutiny, for example with restrictive permissions on the parent directory, so the container can still reach its volumes. After any permission change, restart and verify the dashboard still responds. Update the image tag deliberately, reading the release notes, instead of using latest.

chmod go-rwx ~/scrutiny
docker compose restart scrutiny
curl -s -o /dev/null -w '%{http_code}\n' http://127.0.0.1:8080
Clean-up: undo the lab

Remove the lab

Keep the backup archive first if you want to be able to recover the history. Stop and remove the container and its network. If you no longer want the data, delete the directories (this irreversibly removes the database and the time series, and may require sudo if they belong to root) and the downloaded image.

docker compose down
sudo rm -rf ~/scrutiny/config ~/scrutiny/influxdb
docker image rm ghcr.io/analogj/scrutiny:v0.10.0-omnibus

What is verified

  • config/collector.yaml syntax (YAML parser)
  • config/scrutiny.yaml syntax (YAML parser)
  • compose.yaml syntax (YAML parser and Compose structure)
  • Syntax of 8 command block(s) (bash -n in an isolated container, not executed)
  • Versions (5), options (1) and config keys (27) checked against 20 official documentation pages
  • Running the whole lab end to end: not executed

Automatic checks run on 16 November 2026. Items marked "·" were not executed: check them in your own environment.

Sources

Article generated with AI.larebelion

Byline

· Chief editor · English edition · London

“A RAID tells you a disk died; Scrutiny tells you it is about to. Pin the version and guard the alert URL.”

Comments (0)

No comments yet. You can be the first.

Write a comment