Restructure into workspace with dashboard and agent
This commit is contained in:
28
README.md
28
README.md
@@ -30,7 +30,7 @@ CM Dashboard is a Rust-powered terminal UI for real-time monitoring of CMTEC inf
|
||||
## Requirements
|
||||
|
||||
- Rust toolchain 1.75+ (install via [`rustup`](https://rustup.rs))
|
||||
- Network access to the CMTEC metrics gossip agents (default `tcp://<host>:6130`)
|
||||
- Network access to the CMTEC metrics gossip agents (default `tcp://<host>:6130`; install `zeromq`/`libzmq` on the host)
|
||||
- Configuration files under `config/` describing hosts and dashboard preferences
|
||||
|
||||
## Installation
|
||||
@@ -46,7 +46,7 @@ cargo build --release
|
||||
The optimized binary is available at `target/release/cm-dashboard`. To install into your Cargo bin directory:
|
||||
|
||||
```bash
|
||||
cargo install --path .
|
||||
cargo install --path dashboard
|
||||
```
|
||||
|
||||
## Configuration
|
||||
@@ -56,7 +56,7 @@ On first launch, the dashboard will create `config/dashboard.toml` and `config/h
|
||||
You can also generate starter configuration files manually with the built-in helper:
|
||||
|
||||
```bash
|
||||
cargo run -- init-config
|
||||
cargo run -p cm-dashboard -- init-config
|
||||
# or, once installed
|
||||
cm-dashboard init-config --dir ./config --force
|
||||
```
|
||||
@@ -107,13 +107,13 @@ Adjust the host list and `data_source.zmq.endpoints` to match your CMTEC gossip
|
||||
## Getting Started
|
||||
|
||||
```bash
|
||||
cargo run -- --config config/dashboard.toml
|
||||
cargo run -p cm-dashboard -- --config config/dashboard.toml
|
||||
# specify a single host
|
||||
cargo run -- --host srv01
|
||||
cargo run -p cm-dashboard -- --host srv01
|
||||
# override ZMQ endpoints at runtime
|
||||
cargo run -- --zmq-endpoint tcp://srv01:6130,tcp://labbox:6130
|
||||
cargo run -p cm-dashboard -- --zmq-endpoint tcp://srv01:6130,tcp://labbox:6130
|
||||
# increase logging verbosity
|
||||
cargo run -- -v
|
||||
cargo run -p cm-dashboard -- -v
|
||||
```
|
||||
|
||||
### Keyboard Shortcuts
|
||||
@@ -126,10 +126,20 @@ cargo run -- -v
|
||||
| `r` | Update status message |
|
||||
| `q` / `Esc` | Quit |
|
||||
|
||||
## Agent
|
||||
|
||||
The metrics agent publishes SMART/service/backup data to the gossip network. Run it on each host (or under systemd/NixOS) and point the dashboard at its endpoint. Example:
|
||||
|
||||
```bash
|
||||
cargo run -p cm-dashboard-agent -- --hostname srv01 --bind tcp://*:6130 --interval-ms 5000
|
||||
```
|
||||
|
||||
Use `--disable-*` flags to skip collectors when a host doesn’t expose those metrics.
|
||||
|
||||
## Development
|
||||
|
||||
- Format: `cargo fmt`
|
||||
- Check: `cargo check`
|
||||
- Run: `cargo run`
|
||||
- Check workspace: `cargo check`
|
||||
- Build release binaries: `cargo build --release`
|
||||
|
||||
The dashboard subscribes to the CMTEC ZMQ gossip network (default `tcp://127.0.0.1:6130`). Received metrics are cached per host and retained in an in-memory ring buffer for future trend analysis.
|
||||
|
||||
Reference in New Issue
Block a user