Ojo is a lightweight host metrics agent written in Rust that collects system and process metrics and exports them via OpenTelemetry OTLP.
- Linux
- Windows
- Solaris (in progress, platform-constrained)
- Polls host metrics on a fixed interval
- Optionally collects per-process metrics
- Computes deltas and rates where applicable
- Exports to any OTLP-compatible backend directly or through an OpenTelemetry Collector
src/main.rs Runtime loop, flush and reconnect behavior
src/config.rs YAML/env config loader and validation
src/linuxcollect.rs Linux collector
src/wincollect.rs Windows collector
src/solarcollect.rs Solaris collector
src/delta.rs Delta and rate derivation
src/metrics.rs OTEL metric instruments and recording
linux.yaml Linux config example
windows.yaml Windows config example
otel.yaml OpenTelemetry Collector example
docker.dev/ QA Dockerfiles and Compose services
1. Pick a config
Use one of the included examples: linux.yaml or windows.yaml.
2. Run
cargo run -- --config linux.yamlcargo run -- --config windows.yaml3. Dump a snapshot for debugging
cargo run -- --config linux.yaml --dump-snapshotservice:
name: linux
instance_id: linux-0001
collection:
poll_interval_secs: 5
include_process_metrics: true
export:
otlp:
endpoint: "http://127.0.0.1:4355/v1/metrics"
protocol: http/protobuf
compression: gzip
timeout_secs: 10
batch:
interval_secs: 5
timeout_secs: 10If metrics is omitted, all metrics are exported.
Single group
metrics: cpuMultiple groups
metrics: [cpu, memory, disk]Advanced
metrics:
groups: [cpu, memory]
include: [system.linux.net.]
exclude: [process.]Rules:
groupsexpands to metric-name prefixesincludeandexcludeare prefix-basedexcludewins overinclude- Unknown groups cause a fast-fail config error
Supported groups: cpu, memory, disk, network, process, filesystem, linux, windows, host
| Variable | Description |
|---|---|
PROC_OTEL_CONFIG |
Config file path override |
PROC_POLL_INTERVAL_SECS |
Poll interval override |
PROC_INCLUDE_PROCESS_METRICS |
Enable process metrics |
OTEL_EXPORTER_OTLP_ENDPOINT |
OTLP endpoint |
OTEL_EXPORTER_OTLP_PROTOCOL |
OTLP protocol |
OTEL_EXPORTER_OTLP_HEADERS |
OTLP headers |
OTEL_EXPORTER_OTLP_COMPRESSION |
OTLP compression |
OTEL_EXPORTER_OTLP_TIMEOUT |
OTLP timeout |
A sample collector config is included in otel.yaml.
- Start the collector
- Point
export.otlp.endpointto its OTLP endpoint - Run Ojo
docker compose -f docker.dev/docker-compose.yml run --rm qa-ubuntu-2204docker compose -f docker.dev/docker-compose.yml run --rm qa-windows-2022-gnuThe Windows GNU check writes output to tests/qa/windows-2022-check.json.
Releases are published via .github/workflows/ci.yml on v* tag push or manual dispatch.
Artifacts built on every release:
| Artifact | Target |
|---|---|
ojo-{version}-linux-x86_64 |
x86_64-unknown-linux-gnu |
ojo-{version}-linux-aarch64 |
aarch64-unknown-linux-gnu |
ojo-{version}-windows-x86_64.exe |
x86_64-pc-windows-gnu |
Optional legacy artifacts (manual dispatch only):
| Artifact | Target |
|---|---|
ojo-{version}-linux-x86_64-legacy |
x86_64 Linux, SSE4.2/AVX/AVX2 disabled |
ojo-{version}-windows-i686-legacy.exe |
i686-pc-windows-gnu |
Download and run — Linux:
curl -L https://github.com/observantio/ojo/releases/download/v0.0.1/ojo-v0.0.1-linux-aarch64 -o ojo
chmod +x ojo
./ojo --config linux.yamlDownload and run — Windows (PowerShell):
Invoke-WebRequest -Uri https://github.com/observantio/ojo/releases/download/v0.0.1/ojo-v0.0.1-windows-x86_64.exe -OutFile ojo.exe
.\ojo.exe --config windows.yamlcargo check
cargo check --target x86_64-pc-windows-gnu
cargo test- Linux-only metrics are omitted on Windows by design
- Unsupported metrics are omitted rather than zeroed
- Windows uses
windows.load.synthetic.*instead of Linux loadavg - Windows process handle count is mapped for open-file-descriptor compatibility
No metrics exported
- Verify
endpointandprotocolmatch your backend (grpcvshttp/protobuf) - Check collector or backend availability
- Enable debug logging:
RUST_LOG=debug cargo run -- --config linux.yaml
Process metrics missing
- Ensure
collection.include_process_metrics: true - Verify process permissions
- Check that
metricsfilters are not excludingprocess.
