How analogj/scrutiny works
Main Components Overview
a) Collector Component
• Location: /collector directory
• Purpose: Gathers S.M.A.R.T metrics from physical drives
• Interfaces with smartd daemon
• Contains device detection and metrics collection logic
b) Web Application (Frontend)
• Location: /webapp/frontend directory
• Angular-based dashboard UI
• Displays drive health status and metrics
• Contains visualization components for S.M.A.R.T data
c) Backend API
• Location: /webapp/backend directory
• Handles data storage and retrieval
• Manages device registration and metrics
• Provides notification services
Data Flow Architecture
[Physical Drives] → [Collector] → [Backend API] → [InfluxDB]
• ↑
• [Web Frontend]
Component Details
For the Collector:
• Subcomponents: device detection, metrics collection, and configuration
• Connection to smartd daemon
• Supported device types (RAID, NVMe, SCSI, etc.)
For the Backend:
• Database migrations and models
• API endpoints (/api/health, /api/devices, etc.)
• Notification services (multiple providers)
• Configuration management
For the Frontend:
• Dashboard components
• Device monitoring views
• Settings management
• Real-time updates
Deployment Options
Two deployment scenarios:
a) Omnibus (All-in-one):
[Docker Container]
• Collector
• Web Frontend
• Backend API
• InfluxDB
b) Hub/Spoke:
[Collector Container 1] ─┐
[Collector Container 2] ─┼→ [Web Container] ← [InfluxDB Container]
[Collector Container n] ─┘
Cross-Cutting Concerns
Following aspects:
• Security capabilities (SYS_RAWIO, SYS_ADMIN)
• Configuration management
• Logging and debugging
• Notification system
• Device detection and monitoring
Additional Details
• Version information
• Supported architectures
• Configuration file locations
• Cron scheduling
• Notification endpoints
This system design should help developers understand both the overall architecture and the specific implementation details of Scrutiny's drive monitoring solution.