RousselTMLEARNING

Article · Observa: from discovery to expertise

Configuring and operating

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 #

📄 Installing Observa: Docker Compose, Kubernetes and configuration →

My progress

  • ⏱ Estimated time : ≈ 3 min

Sign in to track your progress and take notes. Sign in

⭐ Rate this lesson

5.0 initial rating from the teaching team

Sign in to rate this lesson →

💬 Questions about this lesson

No questions yet: be the first to ask for help or share your configuration.

Ask a question about this lesson →

Recommended Articles

Installing and configuring CrowdSec: packages, Docker, acquisition

Install CrowdSec with packages or Docker, understand its files, declare the logs to read, enroll ...

Installing Grafana Loki (Docker Compose, binary and Helm)

Install and validate Grafana Loki: minimal configuration, Docker Compose with Grafana and Alloy, ...

Installing Grafana Tempo (Docker Compose, binary and Helm)

Install Grafana Tempo: the tempo.yaml configuration, Docker Compose with Grafana and Prometheus, ...

Securing Observa: authentication, roles and multi-tenancy

Configure access to Observa: local accounts, LDAP and Active Directory, OIDC, SAML, auth proxy, r...

Deploying and operating Pyroscope on Kubernetes

Install Pyroscope with Helm, collect cluster profiles with Alloy (annotations and eBPF), size, se...

Operating Grafana: internal metrics, health, logs, performance and backups

Operating Grafana: /metrics and /api/health endpoints, logs, slow queries, dashboard performance,...

Dashboards, Explore and Drilldown in Observa

Build Grafana v2 dashboards in Observa: visualizations, variables, transformations, import from g...

Discovering Observa: the self-hosted observability console

What Observa is, what it adds to Grafana OSS, its five-service architecture, its parity with Graf...

Connecting sources and collecting telemetry for Observa

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

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!