Files
snapraid_smart_logging/.env.example
T
WesandClaude Sonnet 4.5 27afedb32e Complete rewrite: SnapRAID SMART logger with BackBlaze algorithm
Fetches SMART data from Scrutiny's InfluxDB and calculates failure
probabilities using the exact BackBlaze tables from SnapRAID source.

Key features:
- Calculates both v12 (with attr 193) and v13 (without attr 193) algorithms
- v12 matches SnapRAID pre-v13.0 (includes Load Cycle Count)
- v13 matches modern SnapRAID v13.0+ (excludes Load Cycle Count)
- Stores both values for trending and comparison
- Correctly applies bit masks (16-bit for 187/188, 32-bit for others)
- Annualizes monthly rates and applies Poisson distribution
- Logs to PostgreSQL with device metadata

Solved the mystery: SnapRAID v12 uses attribute 193 which was removed
in v13.0. Load cycle count has massive impact on failure predictions
for some drives (80% vs 4% difference).

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-07 06:55:39 -05:00

16 lines
421 B
Bash

# InfluxDB Configuration
INFLUXDB_URL=http://your-docker-host:8086
INFLUXDB_TOKEN=your-scrutiny-token
INFLUXDB_ORG=scrutiny
INFLUXDB_BUCKET=metrics
# Scrutiny API Configuration (defaults to INFLUXDB_URL with port 8080)
SCRUTINY_API_URL=http://your-docker-host:8080
# PostgreSQL Configuration
POSTGRES_HOST=localhost
POSTGRES_PORT=5432
POSTGRES_DB=smart_monitoring
POSTGRES_USER=postgres
POSTGRES_PASSWORD=your-password