Expand description
§DOL — Docker Observability Language
A SQL-like query language for Docker infrastructure. Query containers, stream events, set up alerts, analyze anomalies, and inspect historical data — all from a single CLI.
§Quick start
ⓘ
use dol::{Cli, cli};
let cli = Cli::parse_from(["dol", "observe containers"]);
cli::run(cli).await?;§Crate structure
| Module | Purpose |
|---|---|
parser | DOL query parser (tokenizer → AST) |
ast | Abstract syntax tree types |
semantic | Type-checking and field validation |
planner | Logical query plan generation |
executor | Batch query execution |
eval | Expression evaluation engine |
docker | Docker client abstraction (bollard) |
metrics | Metrics collection |
events | Event streaming |
alerts | Alert rule evaluation |
storage / sqlite_store | Telemetry persistence |
cli | CLI argument parsing and dispatch |
repl | Interactive REPL |
dashboard | TUI dashboard and top |
config | Configuration management |
export | InfluxDB / Loki / Prometheus output |
analyze | Anomaly detection and diagnostics |
collector | Background telemetry collection |
Re-exports§
pub use cli::Cli;pub use cli::OutputFormat;pub use export::ExportFormat;
Modules§
- alerts
- Alert evaluation engine.
- analyze
- Deterministic analysis and insight engine.
- ast
- Abstract syntax tree (AST) types for parsed DOL queries.
- cli
- CLI argument parsing and command dispatch.
- collector
- Background telemetry collection loop.
- config
- Configuration management.
- dashboard
- TUI dashboard and top-like container monitor.
- docker
- Docker client abstraction and domain types.
- eval
- Expression evaluation engine.
- events
- Docker event streaming and collection.
- executor
- Query execution engine.
- export
- Export query results to external monitoring systems.
- metrics
- Metrics collection from Docker containers.
- parser
- DOL query parser — tokenizer and recursive-descent parser.
- planner
- Logical query plan generation.
- repl
- Interactive REPL (Read-Eval-Print Loop).
- semantic
- Semantic analysis and type checking.
- sqlite_
store - SQLite-backed telemetry store.
- storage
- Telemetry storage abstractions.
Constants§
- ANSI_
BOLD - ANSI style modifiers.
- ANSI_
DIM - ANSI_
FG_ BLACK - ANSI foreground (text) colors — standard 3/4-bit palette.
- ANSI_
FG_ BLUE - ANSI_
FG_ CYAN - ANSI_
FG_ DARK_ GRAY - ANSI foreground colors — bright (90–97) palette.
- ANSI_
FG_ GREEN - ANSI_
FG_ LIGHT_ BLUE - ANSI_
FG_ LIGHT_ CYAN - ANSI_
FG_ LIGHT_ GREEN - ANSI_
FG_ LIGHT_ MAGENTA - ANSI_
FG_ LIGHT_ RED - ANSI_
FG_ LIGHT_ YELLOW - ANSI_
FG_ MAGENTA - ANSI_
FG_ RED - ANSI_
FG_ WHITE - ANSI_
FG_ YELLOW - ANSI_
ITALIC - ANSI_
RESET - ANSI reset — clears all formatting.
- ANSI_
UNDERLINE - CPU_
RED_ THRESHOLD - CPU percentage above which the value is coloured red (>80%).
- CPU_
YELLOW_ THRESHOLD - CPU percentage above which the value is coloured yellow (>50%).
- HALF_GB
- 512 MB expressed in bytes — used for memory thresholding.
- ONE_GB
- 1 GB expressed in bytes — used for memory thresholding and byte formatting.