https://www.github.com/fireinice/docker-smart-sniffer
432
A lightweight, Dockerized agent for monitoring disk SMART data. This project automatically detects your system's physical disks (SATA/SAS and NVMe) and generates a tailored Docker Compose configuration with the minimum required security capabilities. You can read more info from DAB-LABS/smart-sniffer.
SYS_RAWIO for SATA, SYS_ADMIN for NVMe) instead of running in full privileged mode.amd64 and arm64 architectures.The easiest way to get started is to use the provided generation script, which scans your hardware and creates a docker-compose.yaml file for you.
Run the generation script. You can optionally pass environment variables to customize the configuration:
# Default generation
chmod +x gen_service.sh
./gen_service.sh
# Or with custom settings
PORT=9099 INTERVAL=30s TOKEN=your_secret_token AGENT_HOSTNAME=my-custom-agent ./gen_service.sh
smart-agent:
image: fireinice/smart-sniffer:latest
container_name: smart-agent
# using hostname to avoid mDNS name conflicts
hostname: my-nas-disks
cap_add:
# Required for NVMe SMART data
- SYS_ADMIN
# Required for SATA/SAS SMART data
- SYS_RAWIO"
# required for mDNS auto discovery
# or using macvlan with home assistant
network_mode: host
environment:
# INTERVAL, TOKEN and PORT for service configuration
- INTERVAL=60s
- PORT=9099
devices:
- "/dev/nvme0n1:/dev/nvme0n1"
- "/dev/sda:/dev/sda"
restart: unless-stopped
### 3. Deploy
Once the `docker-compose.yaml` is generated, start the service:
```bash
docker compose up -d
The following environment variables can be set during generation or modified directly in the generated docker-compose.yaml:
| Variable | Default | Description |
|---|---|---|
PORT | 9099 | The port the agent will listen on. |
INTERVAL | 60s | How often the agent scans disk health. |
TOKEN | (None) | Optional authentication token for the agent. |
AGENT_HOSTNAME | smart-agent-XXXXX | Custom hostname for the container (randomly generated if unset). |
gen_service.sh uses lsblk to find all physical disks.SYS_RAWIO.SYS_ADMIN.Dockerfile uses download.sh to fetch the latest specialized smart-agent binary fromContent type
Image
Digest
sha256:ae9ca95d5…
Size
32.1 MB
Last updated
5 months ago
docker pull fireinice/smart-sniffer