On Debian 13:
sudo apt update
sudo apt install -y docker.io docker-compose
sudo systemctl enable --now docker
On RHEL 10:
sudo dnf install -y docker docker-compose
sudo systemctl enable --now docker
Create directory structure:
sudo mkdir -p /opt/scrutiny/config
sudo mkdir -p /opt/scrutiny/influxdb2
Create Docker Compose file:
sudo tee /opt/scrutiny/docker-compose.yml >/dev/null <<'EOF'
version: '3'
services:
scrutiny:
image: ghcr.io/analogj/scrutiny:master-web
container_name: scrutiny
restart: unless-stopped
ports:
- "8080:8080"
volumes:
- /opt/scrutiny/config:/opt/scrutiny/config
- /opt/scrutiny/influxdb2:/opt/scrutiny/influxdb2
- /run/udev:/run/udev:ro
cap_add:
- SYS_RAWIO
device_cgroup_rules:
- 'c *:* rwm'
environment:
- SCRUTINY_WEB_INFLUXDB_HOST=influxdb
- SCRUTINY_WEB_INFLUXDB_PORT=8086
- SCRUTINY_WEB_INFLUXDB_BUCKET=scrutiny
- SCRUTINY_WEB_INFLUXDB_ORG=scrutiny
- SCRUTINY_WEB_INFLUXDB_TOKEN=scrutiny_token
- SCRUTINY_WEB_INFLUXDB_SCHEMA=http
influxdb:
image: influxdb:2.7
container_name: scrutiny-influxdb
restart: unless-stopped
volumes:
- /opt/scrutiny/influxdb2:/var/lib/influxdb2
environment:
- DOCKER_INFLUXDB_INIT_MODE=setup
- DOCKER_INFLUXDB_INIT_USERNAME=scrutiny
- DOCKER_INFLUXDB_INIT_PASSWORD=scrutiny_password
- DOCKER_INFLUXDB_INIT_ORG=scrutiny
- DOCKER_INFLUXDB_INIT_BUCKET=scrutiny
- DOCKER_INFLUXDB_INIT_RETENTION=1w
- DOCKER_INFLUXDB_INIT_ADMIN_TOKEN=scrutiny_token
EOF
Start Scrutiny:
cd /opt/scrutiny
docker compose up -d
On the host system (for collecting SMART data):
On Debian 13:
sudo apt install -y smartmontools
On RHEL 10:
sudo dnf install -y smartmontools
Create collector configuration:
sudo tee /opt/scrutiny/config/scrutiny.yaml >/dev/null <<'EOF'
host:
listeners:
- type: api
port: 8080
database:
location: /opt/scrutiny/config/scrutiny.db
web:
listen:
port: 8080
host: 0.0.0.0
influxdb:
retention_policy: true
bucket: scrutiny
org: scrutiny
token: scrutiny_token
host: http://influxdb:8086
EOF
Collect SMART data from all drives:
docker run --rm -it \
-v /opt/scrutiny/config:/opt/scrutiny/config \
-v /run/udev:/run/udev:ro \
--cap-add SYS_RAWIO \
--device-cgroup-rule='c *:* rwm' \
ghcr.io/analogj/scrutiny:master-collector \
scrutiny-collector-metrics run
For non-Docker installation:
sudo tee /etc/systemd/system/scrutiny.service >/dev/null <<'EOF'
[Unit]
Description=Scrutiny SMART Monitoring
After=network.target
[Service]
Type=simple
User=root
ExecStart=/usr/local/bin/scrutiny start
WorkingDirectory=/opt/scrutiny
Restart=on-failure
[Install]
WantedBy=multi-user.target
EOF
On UFW:
sudo ufw allow 8080/tcp
On firewalld:
sudo firewall-cmd --permanent --add-port=8080/tcp
sudo firewall-cmd --reload
Open http://SERVER_IP:8080 to access the Scrutiny web interface.
Create cron job for automatic data collection:
sudo crontab -e
Add:
0 */6 * * * docker run --rm -v /opt/scrutiny/config:/opt/scrutiny/config -v /run/udev:/run/udev:ro --cap-add SYS_RAWIO --device-cgroup-rule='c *:* rwm' ghcr.io/analogj/scrutiny:master-collector scrutiny-collector-metrics run
Edit /opt/scrutiny/config/scrutiny.yaml:
notify:
urls:
- "https://hooks.slack.com/services/YOUR/WEBHOOK/URL"
email:
enabled: true
smtp:
host: smtp.example.com
port: 587
username: noreply@example.com
password: smtp-password
from: "scrutiny@example.com"
to:
- "admin@example.com"
The web interface shows:
Scrutiny provides a REST API:
# Get all devices
curl http://localhost:8080/api/devices
# Get specific device
curl http://localhost:8080/api/device/wwn0x1234567890
# Get metrics
curl http://localhost:8080/api/device/wwn0x1234567890/metrics
sudo apt install -y golang-go # Debian
sudo dnf install -y golang # RHEL
cd /tmp
git clone https://github.com/AnalogJ/scrutiny.git
cd scrutiny/webapp
go build -o scrutiny
sudo mv scrutiny /usr/local/bin/
docker logs scrutiny
docker logs scrutiny-influxdb
sudo smartctl -a /dev/sda
docker exec scrutiny-influxdb influx query 'from(bucket:"scrutiny") |> range(start: -1h)'
See Scrutiny Hardening.
Need professional assistance with your monitoring infrastructure? Our team provides:
Get in touch: office@linux-server-admin.com | Contact Page
Prefer automation? See Scrutiny Ansible Setup for an example playbook.
Prefer containers? See Scrutiny Docker Setup.
See Scrutiny Configuration for configuration guidance.
See Scrutiny Security for hardening guidance.