Skip to content
amti-solutionPublic

About

Custom dashboards for monitoring time-series data from InfluxDB, with interactive charts, threshold alerts, and real-time notifications.

Topics

Resources

Security policy

Stars

2 stars

Watchers

0 watching

Forks

Latest commit

 

History

197 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Observed

Observed is a custom dashboard application for InfluxDB data, with charts, tables, and email alerts.

This guide deploys the ready-to-run image from Docker Hub. Images support Linux AMD64 and ARM64.

Monitor data availability

To receive notifications when readings stop, create an alert with Alert type → No data and set its duration. Firing and recovery appear in-app for users with alert access; email delivery is optional.

No-data detection is configured in alert rules. The in-app Docs explain timestamp fields, query requirements, and configuration examples.

Before you start

  • Install Docker Engine. For Compose deployments, use Docker Compose 2.23.1 or later.
  • Choose PostgreSQL in Docker Compose or an existing PostgreSQL database.
  • Choose an image version. The examples use amtisolustion/observed:latest; for production, pin a tested release tag such as amtisolustion/observed:1.0.13.
  • Generate an application key once with openssl rand -base64 32. Keep this key with your database backups and reuse it when updating the same installation.

The examples bind to 127.0.0.1:3000. Use your existing infrastructure to serve a public domain with HTTPS. To expose the port directly on the server, change the bind address to 0.0.0.0.

Option 1: Docker run

Use this option with an existing PostgreSQL database. Create observed.env:

DATABASE_URL=postgresql://observed:YOUR_ENCODED_PASSWORD@db.example.com:5432/observed
OBSERVE_SECRET_KEY=YOUR_32_BYTE_BASE64_KEY
OBSERVE_TIMEZONE=UTC

Replace the example database connection and key with your own values. Protect the file, then start Observed:

chmod 600 observed.env
docker pull amtisolustion/observed:latest
docker run -d \
  --name observed \
  --restart unless-stopped \
  --init \
  --read-only \
  --tmpfs /tmp:size=64m,mode=1777 \
  --cap-drop ALL \
  --security-opt no-new-privileges:true \
  --stop-timeout 45 \
  --log-opt max-size=10m \
  --log-opt max-file=3 \
  --add-host host.docker.internal:host-gateway \
  -p 127.0.0.1:3000:3000 \
  --env-file observed.env \
  amtisolustion/observed:latest

You can also supply environment variables directly using -e:

docker run -d --name observed --restart unless-stopped --init \
  -p 127.0.0.1:3000:3000 \
  -e DATABASE_URL='postgresql://observed:YOUR_ENCODED_PASSWORD@db.example.com:5432/observed' \
  -e OBSERVE_SECRET_KEY='YOUR_32_BYTE_BASE64_KEY' \
  -e OBSERVE_TIMEZONE=Asia/Jakarta \
  amtisolustion/observed:latest

Choose one of these creation commands. -e overrides the same setting from --env-file. For another host port, use -p 127.0.0.1:8003:3000, for example. The container listens on port 3000.

Option 2: Docker Compose

Create an installation folder and save the following as compose.yaml. Everything needed is included below; no GitHub download or source checkout is required. The same file supports bundled or external PostgreSQL.

name: observed

services:
  app:
    image: ${OBSERVE_IMAGE:-amtisolustion/observed:latest}
    depends_on:
      database:
        condition: service_healthy
        required: false
    init: true
    restart: unless-stopped
    environment:
      DATABASE_URL: ${DATABASE_URL:-}
      DATABASE_URL_FILE: ${DATABASE_URL_FILE:-}
      POSTGRES_HOST: ${POSTGRES_HOST:-database}
      POSTGRES_PORT: ${POSTGRES_PORT:-5432}
      POSTGRES_DB: ${POSTGRES_DB:-observed}
      POSTGRES_USER: ${POSTGRES_USER:-observed}
      POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-}
      POSTGRES_PASSWORD_FILE: ${POSTGRES_PASSWORD_FILE:-}
      OBSERVE_SECRET_KEY: ${OBSERVE_SECRET_KEY:-}
      OBSERVE_SECRET_KEY_FILE: ${OBSERVE_SECRET_KEY_FILE:-}
      OBSERVE_TIMEZONE: ${OBSERVE_TIMEZONE:-UTC}
      OBSERVE_QUERY_MAX_ROWS: ${OBSERVE_QUERY_MAX_ROWS:-50000}
      OBSERVE_QUERY_MAX_RESPONSE_MB: ${OBSERVE_QUERY_MAX_RESPONSE_MB:-32}
      OBSERVE_QUERY_TIMEOUT_SECONDS: ${OBSERVE_QUERY_TIMEOUT_SECONDS:-30}
      OBSERVE_LOG_ENABLED: ${OBSERVE_LOG_ENABLED:-false}
      OBSERVE_LOG_DIR: ${OBSERVE_LOG_DIR:-/app/logs}
      OBSERVE_LOG_LEVEL: ${OBSERVE_LOG_LEVEL:-info}
      OBSERVE_LOG_RETENTION_DAYS: ${OBSERVE_LOG_RETENTION_DAYS:-30}
      OBSERVE_GOOGLE_ENABLED: ${OBSERVE_GOOGLE_ENABLED:-false}
      OBSERVE_GOOGLE_CLIENT_ID: ${OBSERVE_GOOGLE_CLIENT_ID:-}
      OBSERVE_GOOGLE_CLIENT_SECRET: ${OBSERVE_GOOGLE_CLIENT_SECRET:-}
      OBSERVE_GOOGLE_CLIENT_SECRET_FILE: ${OBSERVE_GOOGLE_CLIENT_SECRET_FILE:-}
      OBSERVE_MICROSOFT_ENABLED: ${OBSERVE_MICROSOFT_ENABLED:-false}
      OBSERVE_MICROSOFT_CLIENT_ID: ${OBSERVE_MICROSOFT_CLIENT_ID:-}
      OBSERVE_MICROSOFT_CLIENT_SECRET: ${OBSERVE_MICROSOFT_CLIENT_SECRET:-}
      OBSERVE_MICROSOFT_CLIENT_SECRET_FILE: ${OBSERVE_MICROSOFT_CLIENT_SECRET_FILE:-}
      OBSERVE_MICROSOFT_TENANT_ID: ${OBSERVE_MICROSOFT_TENANT_ID:-}
      OBSERVE_OAUTH_ALLOW_SIGNUP: ${OBSERVE_OAUTH_ALLOW_SIGNUP:-false}
    ports:
      - '${OBSERVE_BIND_ADDRESS:-127.0.0.1}:${OBSERVE_HTTP_PORT:-3000}:3000'
    extra_hosts:
      - 'host.docker.internal:host-gateway'
    volumes:
      - app_logs:/app/logs
    read_only: true
    tmpfs:
      - /tmp:size=64m,mode=1777
    cap_drop:
      - ALL
    security_opt:
      - no-new-privileges:true
    stop_grace_period: 45s
    logging:
      driver: json-file
      options:
        max-size: 10m
        max-file: '3'

  database:
    profiles: [postgres]
    image: postgres:18-alpine
    restart: unless-stopped
    environment:
      POSTGRES_DB: ${POSTGRES_DB:-observed}
      POSTGRES_USER: postgres
      POSTGRES_PASSWORD: ${POSTGRES_ADMIN_PASSWORD:-}
      OBSERVE_DB_USER: ${POSTGRES_USER:-observed}
      OBSERVE_DB_PASSWORD: ${POSTGRES_PASSWORD:-}
      OBSERVE_DB_NAME: ${POSTGRES_DB:-observed}
      POSTGRES_INITDB_ARGS: --auth-host=scram-sha-256
    volumes:
      - postgres_data:/var/lib/postgresql
    configs:
      - source: database_init
        target: /docker-entrypoint-initdb.d/observed.sh
    healthcheck:
      test: ['CMD-SHELL', 'pg_isready -h 127.0.0.1 -U "$${POSTGRES_USER}" -d "$${POSTGRES_DB}"']
      interval: 5s
      timeout: 5s
      retries: 10
      start_period: 15s
    security_opt:
      - no-new-privileges:true
    stop_grace_period: 45s
    logging:
      driver: json-file
      options:
        max-size: 10m
        max-file: '3'

volumes:
  app_logs:
  postgres_data:

configs:
  database_init:
    content: |
      #!/bin/sh
      set -eu

      : "$${OBSERVE_DB_PASSWORD:?Set POSTGRES_PASSWORD for bundled PostgreSQL}"

      # The app owns its database but cannot create roles/databases or act as a superuser.
      psql --set=ON_ERROR_STOP=1 --username "$$POSTGRES_USER" --dbname "$$POSTGRES_DB" \
        --set=app_user="$$OBSERVE_DB_USER" --set=app_password="$$OBSERVE_DB_PASSWORD" --set=app_database="$$OBSERVE_DB_NAME" <<'SQL'
      SELECT format('CREATE ROLE %I LOGIN NOSUPERUSER NOCREATEDB NOCREATEROLE PASSWORD %L', :'app_user', :'app_password') \gexec
      SELECT format('ALTER DATABASE %I OWNER TO %I', :'app_database', :'app_user') \gexec
      SQL

Next, create .env.docker beside compose.yaml using one of the database configurations below. Replace all placeholder credentials before starting and protect the file:

chmod 600 .env.docker

PostgreSQL included

Create .env.docker with:

COMPOSE_PROJECT_NAME=observed
COMPOSE_PROFILES=postgres
OBSERVE_IMAGE=amtisolustion/observed:latest
DATABASE_URL=
POSTGRES_DB=observed
POSTGRES_USER=observed
POSTGRES_PASSWORD=YOUR_APPLICATION_DATABASE_PASSWORD
POSTGRES_ADMIN_PASSWORD=YOUR_SEPARATE_DATABASE_ADMIN_PASSWORD
OBSERVE_SECRET_KEY=YOUR_32_BYTE_BASE64_KEY
OBSERVE_TIMEZONE=UTC
OBSERVE_HTTP_PORT=3000
OBSERVE_BIND_ADDRESS=127.0.0.1

Use different, randomly generated database passwords. You can generate each with openssl rand -hex 32. Generate the application key separately with openssl rand -base64 32.

docker compose --env-file .env.docker pull
docker compose --env-file .env.docker up -d --wait

This starts Observed and PostgreSQL. Database data is stored in a named volume, and the application uses a dedicated database account without superuser privileges. PostgreSQL is reachable only inside the Compose network by default. Initialization runs only when the volume is first created.

Existing PostgreSQL

For an external database, create .env.docker with COMPOSE_PROFILES empty and your connection URL:

COMPOSE_PROJECT_NAME=observed
COMPOSE_PROFILES=
OBSERVE_IMAGE=amtisolustion/observed:latest
DATABASE_URL=postgresql://observed:YOUR_ENCODED_PASSWORD@db.example.com:5432/observed
OBSERVE_SECRET_KEY=YOUR_32_BYTE_BASE64_KEY
OBSERVE_TIMEZONE=UTC
OBSERVE_HTTP_PORT=3000
OBSERVE_BIND_ADDRESS=127.0.0.1

Run the same pull and up commands. This starts only Observed; no PostgreSQL container is created. Compose may report the disabled optional database dependency; the external connection is used normally.

These examples describe new installations. Changing the database mode does not move existing data. For migration, back up and restore your database and retain its matching application key.

Environment settings in Compose

The supplied Compose file maps settings from .env.docker or exported shell variables into the container. For another settings file, change --env-file. You may also edit app.environment in your own Compose file. Shell values override matching values in the interpolation file:

OBSERVE_HTTP_PORT=8003 docker compose --env-file .env.docker up -d --wait

Configuration

Setting Purpose
DATABASE_URL Connection URL for existing PostgreSQL; takes precedence over individual PostgreSQL fields
POSTGRES_HOST, POSTGRES_PORT, POSTGRES_DB, POSTGRES_USER, POSTGRES_PASSWORD Alternative database connection settings; also used for bundled PostgreSQL
OBSERVE_SECRET_KEY Required application key; keep it unchanged for an existing database
OBSERVE_TIMEZONE Display time zone; defaults to UTC, for example Asia/Jakarta
OBSERVE_IMAGE Image/version selected by the supplied Compose file
COMPOSE_PROFILES Set to postgres for bundled PostgreSQL, or leave empty for an external database
OBSERVE_HTTP_PORT, OBSERVE_BIND_ADDRESS Published port and interface for the supplied Compose file

The external database must already exist, and its account must be able to create and migrate Observed's tables. Percent-encode special characters in URL passwords. Follow your database provider's TLS requirements.

Inside a container, localhost refers to that container. For a database on the Docker host, use host.docker.internal; the examples include its host mapping. For a separate database container, use a shared Docker network and its service/container name.

Google and Microsoft sign-in

Add the relevant settings to your environment file or pass them with -e:

OBSERVE_GOOGLE_ENABLED=false
OBSERVE_GOOGLE_CLIENT_ID=
OBSERVE_GOOGLE_CLIENT_SECRET=
OBSERVE_MICROSOFT_ENABLED=false
OBSERVE_MICROSOFT_CLIENT_ID=
OBSERVE_MICROSOFT_CLIENT_SECRET=
OBSERVE_MICROSOFT_TENANT_ID=
OBSERVE_OAUTH_ALLOW_SIGNUP=false

Set a provider's enabled value to true after entering its credentials. Microsoft also requires your specific tenant ID. New provider accounts are allowed only when OBSERVE_OAUTH_ALLOW_SIGNUP=true; existing accounts can link a provider from Profile.

Register the appropriate callback URL:

  • Google: https://YOUR_DOMAIN/api/observe/auth/oauth/google/callback
  • Microsoft: https://YOUR_DOMAIN/api/observe/auth/oauth/microsoft/callback

Your infrastructure must forward the public host and protocol so callbacks match the address users open.

First sign-in

Open http://localhost:3000/sign-in, or your configured address. Create the first administrator account; there is no default username or password. Setup cannot be repeated once completed.

Add data sources in Configuration, then create dashboards and alert rules. In-app notifications are automatic. Add an SMTP account for optional email delivery. InfluxDB is connected separately and is not included in this deployment.

Check the deployment

For Compose:

docker compose --env-file .env.docker ps
docker compose --env-file .env.docker logs --tail=100 -f app

For Docker run:

docker ps --filter name=observed
docker logs --tail=100 -f observed

Readiness is available at http://localhost:3000/api/health. If the application cannot connect, check the database address, credentials, and network access.

Optional daily log files

File logging is disabled by default. To enable it in Compose, add this to .env.docker and recreate the app container:

OBSERVE_LOG_ENABLED=true
OBSERVE_LOG_DIR=/app/logs
OBSERVE_LOG_LEVEL=info
OBSERVE_LOG_RETENTION_DAYS=30

The included Compose file persists logs in its app_logs volume. Files are named observed-YYYY-MM-DD.log and contain one JSON record per line. Mount that volume read-only in your collector. With docker run, add --env OBSERVE_LOG_ENABLED=true --mount type=volume,source=observed_logs,target=/app/logs to your existing command. Set retention to 0 to keep all files. Restart the process/container after changing settings.

Read /docs/operations/logging on your installation for coverage, privacy, file permissions, and a Promtail configuration example. Credentials and request bodies are not logged.

Backup and update

Back up PostgreSQL and preserve the matching OBSERVE_SECRET_KEY before updating. For bundled PostgreSQL, create a new backup file from your installation folder:

mkdir -p backups
umask 077
docker compose --env-file .env.docker exec -T database sh -c \
  'exec pg_dump --format=custom --no-owner --no-acl --username="$POSTGRES_USER" --dbname="$POSTGRES_DB"' \
  > backups/observed-before-update.dump

Use a new filename for each backup. Check that the command succeeded before relying on the dump. External databases should use your database provider's backup tools. Restore instructions are in the backup guide.

For Compose, update OBSERVE_IMAGE in .env.docker, then run:

docker compose --env-file .env.docker pull
docker compose --env-file .env.docker up -d --wait

For Docker run, pull the desired version, stop and remove the application container, then run its original creation command with the new image and existing environment file:

docker pull amtisolustion/observed:latest
docker stop --time 45 observed
docker rm observed

Environment changes also require recreating the container. Restarting alone does not apply them. Do not replace the application key or upgrade PostgreSQL's major version as part of a routine application update. docker compose down --volumes deletes the bundled database data.

Query capacity

Queries return up to 50,000 rows by default. For larger installations, set OBSERVE_QUERY_MAX_ROWS (1,000–250,000), OBSERVE_QUERY_MAX_RESPONSE_MB (1–128, default 32), and OBSERVE_QUERY_TIMEOUT_SECONDS (5–120, default 30) using docker run -e or your Compose environment. Restart or recreate the app after changing these settings. Larger limits require more memory and InfluxDB capacity; keep them bounded.

Documentation and support

Open /docs on your Observed installation to read the documentation without signing in. For example, use http://localhost:3000/docs or https://YOUR_DOMAIN/docs. Documentation has its own layout and navigation, separate from the application. Its URL is not listed in the application sidebar or header.

Open /swagger on the same installation for the interactive API reference, or download /swagger.yml. See the API guide for authentication, permissions, and integration examples.

Deployment security and known trust boundaries are described in the security guide.

See the complete documentation for usage, administration, and development. For assistance, contact AMTI.

Observed is licensed under the MIT License. Copyright belongs to AMTI. The application image includes LICENSE. Third-party attribution is retained in the bundled code.

About

Custom dashboards for monitoring time-series data from InfluxDB, with interactive charts, threshold alerts, and real-time notifications.

Topics

Resources

Security policy

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages