| Crates.io | mecha10-nodes-diagnostics |
| lib.rs | mecha10-nodes-diagnostics |
| version | 0.1.25 |
| created_at | 2025-11-25 02:26:26.685263+00 |
| updated_at | 2026-01-01 02:43:54.023682+00 |
| description | Diagnostics node that publishes Docker and system resource metrics |
| homepage | |
| repository | https://github.com/mecha-industries/mecha10 |
| max_upload_size | |
| id | 1949096 |
| size | 91,749 |
A standalone node that publishes Docker container and system resource metrics to diagnostic topics.
The diagnostics node continuously monitors and publishes:
This complements the metrics published by simulation-bridge (streaming pipeline and Godot connection metrics).
Every 5 seconds:
/diagnostics/docker/containers - One message per running container/diagnostics/system/resources - System-wide resource usagecargo run -p mecha10-nodes-diagnostics
# 1. Start control plane
docker compose up -d
# 2. Start diagnostics node
cargo run -p mecha10-nodes-diagnostics &
# 3. Start simulation (publishes streaming/Godot metrics)
cd my-robot
mecha10 dev
CLI:
# Watch all diagnostics
mecha10 diagnostics watch
# Docker only
mecha10 diagnostics watch --docker
# System only
mecha10 diagnostics watch --system
Dashboard:
Open browser: http://localhost:3000/dashboard/diagnostics
Published to: /diagnostics/docker/containers
DockerContainerMetrics {
container_id: String, // Docker container ID
container_name: String, // Friendly name
cpu_percent: f64, // CPU usage percentage
memory_usage_bytes: u64, // Bytes used
memory_limit_bytes: u64, // Bytes limit
network_rx_bytes: u64, // Network received
network_tx_bytes: u64, // Network transmitted
block_read_bytes: u64, // Disk read
block_write_bytes: u64, // Disk write
}
Published to: /diagnostics/system/resources
SystemResourceMetrics {
cpu_percent: f64, // Total CPU usage
memory_used_bytes: u64, // Memory used
memory_total_bytes: u64, // Total memory
memory_percent: f64, // Memory usage %
disk_used_bytes: u64, // Disk used
disk_total_bytes: u64, // Total disk
disk_percent: f64, // Disk usage %
network_rx_bytes: u64, // Network received
network_tx_bytes: u64, // Network transmitted
}
mecha10-core - Framework context and pub/submecha10-diagnostics - Diagnostic collectorstokio - Async runtimetracing - Loggingsimulation-bridge publishes:
/diagnostics/streaming/pipeline/diagnostics/streaming/encoding/diagnostics/streaming/bandwidth/diagnostics/godot/connectiondiagnostics-node publishes:
/diagnostics/docker/containers/diagnostics/system/resourcesTogether they provide complete system visibility.
The mecha10 diagnostics CLI command subscribes to all diagnostic topics, so it automatically receives metrics from both nodes.
The /dashboard/diagnostics page subscribes to all diagnostic topics via WebSocket.
Note: Requires WebSocket server to forward Redis pub/sub messages to WebSocket clients.
Problem: Docker metrics not appearing
Solutions:
docker psps aux | grep diagnostics-nodeProblem: System metrics not appearing
Solutions:
redis-cli pingcargo build -p mecha10-nodes-diagnostics
# Run the node
cargo run -p mecha10-nodes-diagnostics
# In another terminal, subscribe to topics
redis-cli
> SUBSCRIBE /diagnostics/docker/containers
> SUBSCRIBE /diagnostics/system/resources
RUST_LOG=debug cargo run -p mecha10-nodes-diagnostics