RousselTMLEARNING

Observability

Installing Observa: Docker Compose, Kubernetes and configuration

Deploy Observa in two minutes with Docker Compose, in production on Kubernetes with Helm, then configure it: environment variables, PostgreSQL database, query cache, upgrades and troubleshooting.

1. Installing with Docker Compose #

Download, generate secrets, start.

In three steps #

Installation in three steps
Prerequisites: Docker 24+ and Docker Compose v2. · Illustration: Observa documentation
mkdir observa && cd observa
curl -fsSLO https://observa.rousseltm.fr/download/observa-compose.tar.gz
curl -fsSLO https://observa.rousseltm.fr/download/observa-compose.tar.gz.sha256
sha256sum -c observa-compose.tar.gz.sha256
tar xzf observa-compose.tar.gz
./scripts/generate-env.sh
docker compose pull && docker compose up -d --no-build
# → http://localhost:3000

The archive contains compose.yml, .env.example, the secret generation script and the provisioning folder. Images are published on ghcr.io/rousseltm. The generate-env.sh script creates the .env file with random secrets and prints the administrator password (admin account) and the alert ingest token: write them down.

Observa stack running
Only port 3000 (UI) is exposed; PostgreSQL is embedded through the embedded-db profile.
Watch out : There is no default password: if you lose the one printed by the script, read the ADMIN_PASSWORD variable in .env. Never commit that file.

First steps #

  1. Connect sources: Connections → Data sources menu, or YAML files in deploy/provisioning/datasources/.
  2. Configure contact points (Teams, Slack, e-mail, ServiceNow…).
  3. Pick your Prometheus in Built-in alerts & SLA → Settings to enable built-in alerts.
  4. Point Prometheus at Observa's Alertmanager API to centralize its alerts.

Going to production #

ROOT_URL=https://observa.example.com
COOKIE_SECURE=true
DATABASE_URL=postgresql+psycopg://observa:<mot-de-passe>@pg.example.com:5432/observa
SESSION_HOURS=8
LOG_LEVEL=INFO
OTEL_ENABLED=true
QUERY_CACHE_REDIS_URL=redis://redis:6379/0
  • A TLS reverse proxy in front of Observa, with COOKIE_SECURE=true and an HTTPS ROOT_URL (notification links, SSO).
  • A managed, backed-up PostgreSQL rather than the embedded one.
  • Secrets (SECRET_KEY, SERVICE_TOKEN, ALERT_INGEST_TOKEN) generated once and kept: SECRET_KEY encrypts source secrets in the database.
Common mistake : Changing SECRET_KEY afterwards makes stored source secrets unreadable: back it up with the database.

2. Installing on Kubernetes #

Helm chart, external database and secrets.

The Helm chart #

# Registre OCI (GHCR)
helm install observa oci://ghcr.io/rousseltm/charts/observa -n observa --create-namespace \
  --set rootUrl=https://observa.example.com \
  --set ingress.enabled=true --set ingress.host=observa.example.com

# or classic Helm repository
helm repo add observa https://observa.rousseltm.fr/charts
helm install observa observa/observa -n observa --create-namespace

# Administrator password
kubectl -n observa get secret observa-secrets -o jsonpath='{.data.admin-password}' | base64 -d
logging: { format: json, level: INFO }
otel: { enabled: true, endpoint: http://otel-collector.monitoring:4318 }
config:
  SESSION_HOURS: "12"
api:
  extraEnv:
    - name: GROUP_ROLE_MAPPING
      value: "GG-Admins:Admin"
existingSecret: observa-secrets
postgresql:
  enabled: false
externalDatabase:
  host: pg.example.com
  existingSecret: observa-db
  sslmode: verify-full
Best practice : Disable the embedded database (postgresql.enabled: false) and reference existing secrets (existingSecret) created by your secret management tool: values.yaml can then be committed safely.
Good to know : The chart's NetworkPolicies only filter ingress: allow egress from the query (to sources), alerting (to notifications), api (to LDAP, OIDC, SAML) and ai (to the AI provider) pods.

3. Configuring #

Environment variables, database and cache.

The principle #

Observa follows the “12-factor” approach: everything is set through environment variables (.env with Compose, values.yaml with Helm). An environment variable locks the matching field in the interface.

Settings precedence
Handy to enforce a setting in production while leaving the UI elsewhere.

Main variables #

VariableDefaultRole
ROOT_URLhttp://localhost:3000public URL (links, SSO)
DATABASE_URLpostgresql+psycopg://observa:observa@db:5432/observaAPI database
ADMIN_USER / ADMIN_PASSWORDadmin / to setinitial administrator
LOCAL_AUTH_ENABLEDTruelocal accounts
PASSWORD_MIN_LENGTH10minimum length
DEFAULT_ROLEViewerrole of new accounts
SESSION_HOURS / COOKIE_SECURE8 / Falsesession length, HTTPS cookie
DB_AUTO_CREATEtruecreates databases (CREATEDB right)
QUERY_WORKERS16parallel queries of the query service
ALERTING_TICK_SECONDS5evaluator tick
PROVISIONING_DIR/etc/observa/provisioningprovisioned sources and dashboards
OTEL_ENABLEDFalseObserva self-instrumentation

The query cache #

Query cache
The key combines source and query; a recent range is rounded to the step. · Illustration: Observa documentation
VariableDefaultRole
QUERY_CACHE_ENABLEDtrueenables the cache
QUERY_CACHE_TTL30time to live (s)
QUERY_CACHE_MAX_ENTRIES2000in-memory entries (LRU)
QUERY_CACHE_MAX_ITEM_KB2048maximum response size
QUERY_CACHE_REDIS_URLemptycache shared across replicas (Helm: query.cache.redisUrl)

The hit rate is tracked with observa_query_cache_total{result="hit|miss"}; an administrator clears the cache with DELETE /api/datasources-cache or a single source's cache with DELETE /api/datasources/{uid}/cache.

Best practice : With several query replicas, plug in Redis: otherwise each replica has its own cache and the hit rate drops. A dashboard opened by 50 people should trigger only one query per panel to Prometheus.

4. Operating #

Upgrades, self-observability and troubleshooting.

Upgrading #

docker compose pull && docker compose up -d --no-build
docker compose ps
docker compose logs -f api alerting

Back up PostgreSQL before an upgrade. On Kubernetes: helm upgrade observa observa/observa -n observa -f values.yaml.

Observing Observa #

Python services instrument themselves with OpenTelemetry (OTEL_ENABLED=true, OTLP endpoint) and log in JSON (logging.format: json). The cache exposes its metrics; also watch the PostgreSQL database and source latency.

Troubleshooting #

SymptomLead
The UI does not answer on port 3000docker compose ps, then docker compose logs ui api
The API restarts in a loopwrong DATABASE_URL, or CREATEDB right missing with DB_AUTO_CREATE=true
Logged out right after logging inCOOKIE_SECURE=true without HTTPS
Notification links point to localhostROOT_URL not set
A field is greyed out in the UIit is enforced by an environment variable
Source secrets unreadable after migrationSECRET_KEY differs from the original

Sources #

Related articles

Discovering Observa: the self-hosted observability console

What Observa is, what it adds to Grafana OSS, its five-service architecture, its parity with Grafana Cloud an…

Securing Observa: authentication, roles and multi-tenancy

Configure access to Observa: local accounts, LDAP and Active Directory, OIDC, SAML, auth proxy, roles and per…

Connecting sources and collecting telemetry for Observa

Declare data sources in Observa (UI or provisioning), handle authentication, PKI, mTLS and proxy, then prepar…

Keep learning

Support us

♥ SUPPORT US

Support RousselTM Learning

Courses, articles, labs and certificates stay free with no intrusive ads. A voluntary contribution, of any amount you choose, pays for hosting, lab environments and new content.

Contribute with PayPal Any amount · card or PayPal accountLearn more
QR code PayPal
Or scan this QR code with your phone

Thank you, every contribution counts!