How boxthatbeat/system-health-dashboard works
This is a three-part system-health monitoring product: a scheduled Windows collector samples OS metrics, posts them to an API that accepts and retains measurements, and an Angular dashboard fetches and charts them. The collector uses configurable plugins for CPU, memory, and storage; the API separates controller, service, and data-access responsibilities. The README also describes adding metrics through plugins and generic metric models. Some wiring is documented rather than sampled, so uncertain details are omitted; the API store shown is in-memory.
Main entry points: MetricsRetrieverService.cs Metrics retriever · WMIProvider.cs WMI provider · dashboard.component.ts Metric charts · SystemMetricsController.cs Metrics endpoint
Components 23
OS Collector
- Collector entry
src/OSMetricsRetriever/Program.cs - Metrics retriever
src/OSMetricsRetriever/Services/MetricsRetrieverService.cs - Plugin contract
src/OSMetricsRetriever/MetricsPlugins/IRetrieveMetricsPlugin.cs - CPU plugin
src/OSMetricsRetriever/MetricsPlugins/CPUUtilizationPlugin.cs - Memory plugin
src/OSMetricsRetriever/MetricsPlugins/MemoryUsagePlugin.cs - Storage plugin
src/OSMetricsRetriever/MetricsPlugins/StorageUsagePlugin.cs - WMI provider
src/OSMetricsRetriever/Providers/WMIProvider.cs - Metric model
src/OSMetricsRetriever/Models/OSMetric.cs - API sender
src/OSMetricsRetriever/Services/SystemHealthAPIService.cs
Metrics API
- Metrics endpoint
src/SystemHealthAPI/Controllers/SystemMetricsController.cs - Metrics service
src/SystemHealthAPI/Services/SystemMetricsService.cs - Data access
src/SystemHealthAPI/Services/IDataAccessService.cs - In-memory metrics
src/SystemHealthAPI/Services/InMemoryDataAccessService.cs - Error middleware
src/SystemHealthAPI/Middleware/ExceptionHandlingMiddleware.cs - Metric model
src/SystemHealthAPI/Models/OSMetric.cs
Dashboard
- Dashboard app
src/SystemHealthDashboard/src/app/app.component.ts - Metric charts
src/SystemHealthDashboard/src/app/components/dashboard/dashboard.component.ts - API client
src/SystemHealthDashboard/src/app/services/system-health-api.service.ts - Chart configuration
src/SystemHealthDashboard/src/app/configuration/chart-types.config.ts
Other components
- Task Scheduler
- Windows OS
- Dashboard user
- Chart renderer
Connections 27
- Task Scheduler → Collector entry: launches
- Collector entry → Metrics retriever: collects via
- Collector entry → API sender: sends through
- Metrics retriever → CPU plugin: invokes
- Metrics retriever → Memory plugin: invokes
- Metrics retriever → Storage plugin: invokes
- CPU plugin → Plugin contract: implements
- Memory plugin → Plugin contract: implements
- Storage plugin → Plugin contract: implements
- Metrics retriever → WMI provider: provides to plugins
- CPU plugin → WMI provider: queries
- Memory plugin → WMI provider: queries
- Storage plugin → WMI provider: queries
- WMI provider → Windows OS: reads via WMI
- Metrics retriever → Metric model: returns metrics
- API sender → Metrics endpoint: POSTs metrics
- Dashboard user → Dashboard app: opens
- Dashboard app → Metric charts: renders
- Metric charts → API client: requests metrics
- API client → Metrics endpoint: GETs metrics
- Metrics endpoint → Metrics service: delegates
- Metrics service → Data access: reads and writes
- Data access → In-memory metrics: implemented by
- In-memory metrics → Metric model: stores
- Metrics endpoint → Error middleware: errors handled by
- Metric charts → Chart configuration: uses
- Metric charts → Chart renderer: renders with