# Scrutiny Disk Health Monitor

> Hard drive health monitoring with S.M.A.R.T. data, predictive failure analysis, and alerting.

- Category: Monitoring & Observability
- Difficulty: intermediate
- Components: scrutiny-web, scrutiny-collector, influxdb
- Tags: scrutiny, disk, smart, hardware, health
- Source: https://docker.recipes/monitoring/scrutiny-disk-monitoring

## Overview

Scrutiny is an open-source hard drive monitoring application created by Jason Kulatunga that provides comprehensive S.M.A.R.T. (Self-Monitoring, Analysis and Reporting Technology) data analysis with predictive failure detection. The project emerged from the need for a modern, web-based alternative to traditional command-line tools like smartctl, offering intuitive dashboards and proactive alerting for storage health management. Scrutiny's omnibus Docker image combines the web interface, data collector, and embedded InfluxDB instance into a single container that continuously monitors connected drives and analyzes their S.M.A.R.T. attributes for signs of degradation or impending failure. This integrated stack leverages InfluxDB's time-series capabilities to store historical S.M.A.R.T. metrics, enabling trend analysis and predictive modeling that can identify failing drives before catastrophic data loss occurs. The combination provides system administrators with early warning systems, detailed health reports, and customizable alerting rules based on manufacturer-specific failure thresholds. This configuration is particularly valuable for homelab enthusiasts, small businesses, and IT professionals managing critical storage infrastructure who need enterprise-grade monitoring without the complexity of separate tool deployment and configuration.

## Features

- Real-time S.M.A.R.T. attribute collection and analysis from connected storage devices
- Predictive failure detection using manufacturer-specific threshold databases and trend analysis
- Web-based dashboard displaying drive health scores, temperature graphs, and detailed attribute history
- Customizable alerting system with email notifications for critical drive conditions
- Historical trend analysis using InfluxDB time-series storage for long-term drive health tracking
- Support for multiple drive types including SATA, SAS, NVMe, and USB-connected storage devices
- Automated drive discovery and registration with configurable scanning intervals
- RESTful API for integration with external monitoring systems and automation tools

## Use cases

- Homelab servers monitoring multiple drives in NAS systems and media servers
- Small business file servers requiring proactive storage failure prevention
- Development workstations with critical project data needing drive health oversight
- Remote server installations where physical drive access for diagnostics is limited
- RAID array monitoring to identify individual drive degradation before array failure
- Data recovery service providers tracking client drive health during imaging processes
- IT departments managing workstation fleets with centralized storage health reporting

## Prerequisites

- Docker host with at least 512MB RAM available for InfluxDB and web interface operation
- Physical or virtual access to storage devices that support S.M.A.R.T. monitoring
- Host system with smartmontools package installed or container running in privileged mode
- Port 8080 available on the host system for web interface access
- Understanding of device mapping concepts to expose storage devices to containers
- Basic knowledge of S.M.A.R.T. attributes and drive health terminology

## docker-compose.yml

```yaml
services:
  scrutiny:
    image: ghcr.io/analogj/scrutiny:master-omnibus
    cap_add:
      - SYS_RAWIO
    ports:
      - "8080:8080"
    volumes:
      - ./scrutiny.yaml:/opt/scrutiny/config/scrutiny.yaml:ro
      - scrutiny_config:/opt/scrutiny/config
      - scrutiny_influxdb:/opt/scrutiny/influxdb
      - /run/udev:/run/udev:ro
    devices:
      - /dev/sda
      - /dev/sdb
    networks:
      - scrutiny-net
    restart: unless-stopped

volumes:
  scrutiny_config:
  scrutiny_influxdb:

networks:
  scrutiny-net:
    driver: bridge
```

## .env

```bash
# Scrutiny Configuration
# All configuration in scrutiny.yaml

# Device paths to monitor
# Add all disks: /dev/sda, /dev/sdb, etc.
```

## Usage notes

- Dashboard at http://localhost:8080
- Add disk devices to container
- Monitors S.M.A.R.T. attributes
- Predictive failure warnings

## Troubleshooting

- No drives detected in dashboard: Verify device mappings in docker-compose and ensure SYS_RAWIO capability is properly assigned
- S.M.A.R.T. data not collecting: Check that smartmontools can access drives on host system and udev volume mount is correctly configured
- High memory usage from InfluxDB: Adjust retention policies in scrutiny.yaml configuration file to limit historical data storage
- Web interface showing connection errors: Confirm InfluxDB embedded instance is starting properly and scrutiny_influxdb volume has sufficient disk space
- Drives showing as unsupported: Update Scrutiny image to latest version for expanded device compatibility and newer S.M.A.R.T. attribute databases
- Alert notifications not working: Verify SMTP configuration in scrutiny.yaml and check container logs for authentication errors

