Skip to main content

Crate dol

Crate dol 

Source
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

ModulePurpose
parserDOL query parser (tokenizer → AST)
astAbstract syntax tree types
semanticType-checking and field validation
plannerLogical query plan generation
executorBatch query execution
evalExpression evaluation engine
dockerDocker client abstraction (bollard)
metricsMetrics collection
eventsEvent streaming
alertsAlert rule evaluation
storage / sqlite_storeTelemetry persistence
cliCLI argument parsing and dispatch
replInteractive REPL
dashboardTUI dashboard and top
configConfiguration management
exportInfluxDB / Loki / Prometheus output
analyzeAnomaly detection and diagnostics
collectorBackground 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.