Serveur WebSocket pour monitoring système en temps réel
Project description
Monitoring WebSocket Server
A real-time system monitoring application that collects system metrics (CPU, memory, disk, GPU) and broadcasts them via WebSocket to connected clients.
Features
- Real-time system monitoring (CPU, memory, disk, GPU)
- WebSocket server for broadcasting metrics
- Configurable alert thresholds
- Multiple data export formats
- Standalone WebSocket server mode
- GPU monitoring with automatic detection
Installation
pip install monitoring-websocket-server
Quick Start
Run as Standalone WebSocket Server
python -m run_server
The server will start on ws://localhost:8765 by default.
Use in Your Application
from monitoring_websocket_server import StandaloneWebSocketServer
# Create and start the server
server = StandaloneWebSocketServer(host='0.0.0.0', port=8765)
await server.start()
Configuration
The system can be configured via JSON/YAML files or programmatically:
from monitoring_websocket_server.config import ConfigurationManager
config = ConfigurationManager()
config.set_alert_thresholds({
'memory': {'warning': 80, 'critical': 90},
'cpu': {'warning': 80, 'critical': 95},
'disk': {'warning': 85, 'critical': 95}
})
Architecture
- Core: Data models and enums
- Monitors: System metric collectors (CPU, memory, disk, GPU)
- Services: Core monitoring and WebSocket services
- Exporters: Data export mechanisms
- Alerts: Configurable alert system with thresholds
Development
# Install dependencies
pip install -r requirements.txt
# Run tests
python test_client.py
python test_gpu.py
License
GPL-3.0-or-later
Author
NMicInvest - accueil@nmicinvest.com
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file monitoring_websocket_server-1.0.83.69.tar.gz.
File metadata
- Download URL: monitoring_websocket_server-1.0.83.69.tar.gz
- Upload date:
- Size: 73.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
37b643b7306dbf4c7a0b6b8c2a9049e567ff3ff2be1d968f7920380b056f62a6
|
|
| MD5 |
9e7a6b3e47b2e72b1f470eae45bb159f
|
|
| BLAKE2b-256 |
63ff372f7ed9112212e03033010c53d3015acd8542d8e5d3a7b948c3c27c0ed2
|
File details
Details for the file monitoring_websocket_server-1.0.83.69-py3-none-any.whl.
File metadata
- Download URL: monitoring_websocket_server-1.0.83.69-py3-none-any.whl
- Upload date:
- Size: 87.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1b1274e6059803ae6c6c75e5e42a2f562eb1dd95d31d9844df8438e71f5bb2c6
|
|
| MD5 |
8e6ba13d038f786960e954857026f5e6
|
|
| BLAKE2b-256 |
47f82836f56bb36ba8c50a1038ef980e9f775f5ade526d383050a3724da4745f
|