Odock.ai
Observability

Operating Observability

Run and understand the Odock observability profile.

Operating Observability

The observability profile is defined in root docker-compose.yml and configuration files under observability/.

Start

docker compose --profile observability up -d

With an explicit env file:

docker compose --env-file observability/.env --profile observability up -d

Components

ComponentPurpose
PrometheusMetrics store and alert rule evaluation
AlertmanagerAlert notification routing
LokiLog storage and search
TempoTrace storage and search
GrafanaDashboards and Explore
OpenTelemetry CollectorOTLP ingest and export
PromtailContainer and host log collection
Node ExporterHost metrics
cAdvisorContainer metrics
Redis exporterRedis metrics
Postgres exporterPostgres metrics

Signal Flow

flowchart LR
  Server[odock-server] -->|/metrics| Prometheus
  Server -->|OTLP traces| OTel[OpenTelemetry Collector]
  OTel --> Tempo
  OTel -->|OTLP metrics exporter surface| Prometheus
  Containers[Docker logs] --> Promtail
  Promtail --> Loki
  Prometheus --> Grafana
  Loki --> Grafana
  Tempo --> Grafana

Default server metrics path is /metrics. The collector also exposes otel-collector:8889 for OTLP metrics from services that use OTLP metrics.

Ports

ServicePort
Grafana127.0.0.1:3001
Prometheus127.0.0.1:9091
Alertmanager127.0.0.1:9093
Loki127.0.0.1:3100
Tempo127.0.0.1:3200
OTLP HTTP127.0.0.1:4318
OTLP gRPC127.0.0.1:4317
Collector health127.0.0.1:13133

Retention Defaults

SignalStoreDefault
MetricsPrometheus TSDB15d, 10GB
LogsLoki filesystem336h
TracesTempo local blocks168h

Override with:

PROMETHEUS_RETENTION_TIME=30d
PROMETHEUS_RETENTION_SIZE=30GB
LOKI_RETENTION_PERIOD=720h
TEMPO_RETENTION=168h

Gateway Telemetry Settings

In Compose, the gateway is wired for Prometheus and traces by environment. Confirm these are set consistently:

OBSERVABILITY_PROMETHEUS_ENABLED=true
OBSERVABILITY_OTEL_TRACES_EXPORTER=otlphttp
OBSERVABILITY_OTEL_METRICS_EXPORTER=none
OBSERVABILITY_OTEL_ENDPOINT=http://otel-collector:4318
OBSERVABILITY_SERVICE_NAME=odock-server
OBSERVABILITY_SERVICE_NAMESPACE=odock
OBSERVABILITY_DEPLOYMENT_ENVIRONMENT=production

Avoid scraping duplicate metric series. If you use OTLP metrics for odock-server, do not also treat /metrics as the same canonical series unless you intentionally want duplicates.

Logs

The default gateway logger emits structured logs to stdout. Promtail collects Docker container logs and ships them to Loki.

Optional file logging is available through logger.yaml, but do not configure Promtail to scrape the same file logs unless duplicate logs in Loki are acceptable.

Datasources

Grafana provisions:

  • Prometheus as the default datasource.
  • Loki with a derived trace field based on trace_id.
  • Tempo with traces-to-logs, traces-to-metrics, service map, node graph, and search enabled.

On this page