- Qt (C++) desktop client
- FastAPI backend service
- Redis for live-state caching
- SQLite/PostgreSQL for persistence
- Low-level C collectors
sudo docker-compose up -dNote for GPU Monitoring: For GPU metrics collection with NVIDIA GPUs on Linux, ensure you have the NVIDIA Container Toolkit installed on your host system. This allows Docker containers to access your host's GPU resources.
Verify backend is running:
curl http://localhost:8000/api/v1/healthInstall Dependencies:
# Ubuntu/Debian
sudo apt-get install qt6-base-dev qt6-charts-dev qt6-tools-dev cmake build-essentialBuild:
cd client
mkdir -p build && cd build
cmake ..
makeFor optimal system metric collection on macOS (avoiding Docker VM metrics), it is recommended to run the C collector natively on your host machine.
- Build the C Collector:
cd collector-c make - Run the Collector:
We've provided a helper script to build and run the collector:
You can customize its behavior by passing arguments, for example:
./collector-c/run-native.sh
(Use the./collector-c/run-native.sh -u http://localhost:8000 -i 10 -d
-dflag to run it as a daemon in the background.)
This will ensure the collector gathers metrics directly from your macOS host. Services like the FastAPI backend, Redis, and the database can continue to run via docker-compose.
./system-metrics-clientIn the client:
- Default URL is
http://localhost:8000 - Click "Connect" to fetch data
- Click "Start Auto-Refresh" for live updates (5s interval)
- Explore different views: Dashboard, Live Metrics, Historical Charts, Logs, and System Info.
- Use File → Export to save collected data.
- File → Clear Cache to remove stored metrics and logs.
- Switch themes via View → Theme (supports Dark and Light modes).
- Access network diagnostic tools with Tools → Ping/Traceroute.
- Real-time Metrics: CPU, memory, disk, network monitoring
- Log Viewer: Filterable system logs with pagination
- Modern UI: Dark theme with green accents and smooth animations
- Auto-refresh: Configurable live data updates
- Cross-platform: Linux, macOS, Windows support
- API Documentation - REST API endpoints
- Setup Guide - Docker setup and testing
- C Collector - C metrics collector and backend integration
- Qt Client - Client dependencies and usage
The backend service can be configured using the following environment variables. These should typically be set in a .env file in the backend/ directory or as Docker environment variables.
| Environment Variable | Default Value | Description |
|---|---|---|
POSTGRES_DB |
system_metrics |
PostgreSQL database name (used internally by Docker). |
POSTGRES_USER |
user |
PostgreSQL database user (used internally by Docker). |
POSTGRES_PASSWORD |
password |
PostgreSQL database password (used internally by Docker). |
DATABASE_URL |
postgresql://user:password@db:5432/system_metrics |
SQLAlchemy database connection URL. Important: For production, this should be a strong, unique password and user. |
REDIS_HOST |
redis |
Hostname for the Redis server. |
REDIS_PORT |
6379 |
Port for the Redis server. |
REDIS_DB |
0 |
Redis database number. |
CACHE_TTL |
60 |
Time-to-live (in seconds) for cached metrics. |
SECRET_KEY |
dev-secret-key-change-in-production |
Secret key for application security. Change in production to a strong, random value. |
METRICS_COLLECTION_INTERVAL |
5 |
Interval (in seconds) for metrics collection. |
METRICS_RETENTION_DAYS |
30 |
Number of days to retain historical metrics. |
METRICS_COLLECTOR |
psutil |
Metrics collection method (psutil or c-collector). |
C_COLLECTOR_PATH |
None |
Absolute path to the C collector binary (if used). |
system-metrics/
├── backend/ # FastAPI backend service
├── client/ # Qt (C++) desktop client
├── collector-c/ # C metrics collector
├── docs/ # Documentation
└── docker-compose.yml # Docker orchestration
Contributions are welcome! Please feel free to submit a pull request or open an issue.
This project is licensed under the MIT License.