Sign inSign up

cropalato/promview

By cropalato

•Updated 8 days ago

Operational console for Prometheus Alertmanager alerts.

Image
Monitoring & observability
0

3.1K

cropalato/promview repository overview

⁠Promview

Operational console for alerts delivered by Prometheus Alertmanager. Promview ingests authenticated webhooks from multiple Alertmanager installations, keeps current alert state in PostgreSQL, and serves a live React console over REST and resumable server-sent events. Alertmanager stays responsible for routing, grouping, inhibition and notification.

⁠Status

Promview is beta. Every feature on its first-release list is implemented and the committed scale is measured, but it has not been run in anger by anyone but its author. The API and schema are settled enough to build on; pin an exact tag rather than tracking a moving one in production.

⁠Tags and architecture

TagMeaning
0.1.0-beta.NAn exact release. Pin this.
betaMoves to the newest beta.
alphaFrozen at the last alpha, 0.1.0-alpha.40.
latestMoves to the newest stable release. None exists yet.

Images are built for linux/amd64 only. There is no arm64 image: the project publishes the one architecture it tests on rather than an emulated build nobody exercises.

⁠Requirements

Promview needs an externally managed PostgreSQL database. It neither bundles nor manages one, in any deployment.

⁠Quick start

services:
  postgres:
    image: postgres:17-alpine
    environment:
      POSTGRES_DB: promview
      POSTGRES_USER: promview
      POSTGRES_PASSWORD: promview
    healthcheck:
      test: ["CMD-SHELL", "pg_isready -U promview -d promview"]
      interval: 2s
      timeout: 3s
      retries: 15
    volumes:
      - postgres-data:/var/lib/postgresql/data

  migrate:
    image: cropalato/promview:beta
    command: ["migrate"]
    depends_on:
      postgres:
        condition: service_healthy
    environment: &app-environment
      PROMVIEW_DATABASE_URL: postgres://promview:promview@postgres:5432/promview?sslmode=disable
      PROMVIEW_BOOTSTRAP_SOURCE_SLUG: demo
      PROMVIEW_BOOTSTRAP_SOURCE_NAME: Development Alertmanager
      PROMVIEW_BOOTSTRAP_SOURCE_TOKEN: development-token

  app:
    image: cropalato/promview:beta
    depends_on:
      migrate:
        condition: service_completed_successfully
    environment: *app-environment
    ports:
      - "8080:8080"

volumes:
  postgres-data:
docker compose up -d

Open http://localhost:8080⁠. This stack runs in open mode: anonymous read-only, with ingestion still authenticated.

Migrations are a separate migrate command rather than something the server does on start, so two replicas cannot race the schema. Run it to completion before the application starts, on every upgrade.

Send an Alertmanager-compatible webhook to the bootstrapped demo source:

curl -X POST http://localhost:8080/api/v1/ingest/alertmanager/demo \
  -H 'Authorization: Bearer development-token' \
  -H 'Content-Type: application/json' \
  -d '{
    "version": "4",
    "alerts": [{
      "status": "firing",
      "labels": {"alertname": "ExampleAlert", "severity": "warning"},
      "annotations": {"summary": "Example alert delivery"},
      "startsAt": "2026-08-14T12:00:00Z"
    }]
  }'

Each source carries its own opaque bearer token, stored only as a SHA-256 hash. Provision or rotate one with the CLI in the same image:

docker compose run --rm app source set \
  --slug production \
  --name 'Production Alertmanager' \
  --token 'replace-with-at-least-16-characters'

⁠Ports

PortPurpose
8080HTTP API and console.
9090Prometheus metrics and the health endpoints.

⁠Configuration

All configuration is environment variables. The container runs as UID/GID 65532 and holds no state on disk.

⁠Required
VariableDescription
PROMVIEW_DATABASE_URLPostgreSQL connection URL. No default.
⁠Server
VariableDefaultDescription
PROMVIEW_LISTEN_ADDRESS:8080API and console listener.
PROMVIEW_METRICS_ADDRESS:9090Metrics and health listener.
PROMVIEW_WEB_DIRECTORY/app/webBuilt console assets.
PROMVIEW_MIGRATIONS_DIRECTORY/app/migrationsMigration files.
PROMVIEW_AUTH_MODEopenopen, oidc, ldap, or local. One at a time.
⁠Source bootstrap

Set the slug and the token together, or neither. Bootstrap initializes a source that is absent or has no credential; it never overwrites a token rotated with promview source set.

VariableDescription
PROMVIEW_BOOTSTRAP_SOURCE_SLUGURL slug of the source to initialize.
PROMVIEW_BOOTSTRAP_SOURCE_NAMEDisplay name.
PROMVIEW_BOOTSTRAP_SOURCE_TOKENIngestion bearer token.
⁠Alert lifecycle
VariableDefaultDescription
PROMVIEW_ALERT_STALE_AFTER12hDefault window before an unreported alert expires. 0 disables expiry. Must exceed the Alertmanager repeat_interval.
PROMVIEW_ALERT_EXPIRY_INTERVAL1mHow often the expiry sweep runs.
PROMVIEW_STREAM_RETENTION24hHow long a stream event is kept so a disconnected client can resume. 0 keeps every event.
PROMVIEW_RECONCILE_INTERVAL1mHow often each source's Alertmanager is read to confirm what is still firing. 0 disables reconciliation.
PROMVIEW_RECONCILE_TIMEOUT10sBounds one Alertmanager request.
PROMVIEW_SILENCE_DEFAULT_DURATION2hSilence length when the operator does not say.
PROMVIEW_SILENCE_MAX_DURATION720hLongest silence an operator may ask for.
⁠OIDC

Required when PROMVIEW_AUTH_MODE=oidc. Promview uses discovery and Authorization Code with PKCE, keeps provider tokens server-side, and never trusts provider role claims directly: groups map to roles through server-owned bindings.

VariableDefaultDescription
PROMVIEW_OIDC_ISSUER_URLIssuer. HTTPS except on loopback.
PROMVIEW_OIDC_CLIENT_IDClient ID.
PROMVIEW_OIDC_CLIENT_SECRETClient secret.
PROMVIEW_OIDC_REDIRECT_URLMust end at /api/v1/auth/oidc/callback.
PROMVIEW_OIDC_SCOPESopenid,profile,email,groupsMust include openid.
PROMVIEW_OIDC_USERNAME_CLAIMpreferred_username
PROMVIEW_OIDC_EMAIL_CLAIMemail
PROMVIEW_OIDC_DISPLAY_NAME_CLAIMname
PROMVIEW_OIDC_GROUPS_CLAIMgroups
PROMVIEW_OPEN_MODE_ROLEviewerIn open mode only: what every anonymous reader is granted. operator and administrator give that to anyone who can reach the port.
PROMVIEW_OPEN_MODE_AUTHORpromview-open-modeThe name open-mode actions are recorded under. Never a person's.
PROMVIEW_LDAP_URL(unset)Required in LDAP mode. ldaps:// unless StartTLS is on or the host is loopback.
PROMVIEW_LDAP_BIND_DN / PROMVIEW_LDAP_BIND_PASSWORD(unset)Service account that performs the user search. Required in LDAP mode.
PROMVIEW_LDAP_BASE_DN(unset)Search base. Required in LDAP mode.
PROMVIEW_LDAP_USER_FILTER(uid=%s)One %s, replaced by the escaped username. (sAMAccountName=%s) for Active Directory.
PROMVIEW_LDAP_GROUP_ATTRIBUTEmemberOfAttribute listing the user's groups.
PROMVIEW_LDAP_GROUP_FORMATcncn or dn. Bindings must be written in the same form.
PROMVIEW_LDAP_ISSUER(the URL)What group bindings are written against.
PROMVIEW_LDAP_START_TLSfalseUpgrade a plain ldap:// connection. Never falls back to cleartext.
PROMVIEW_LDAP_TIMEOUT10sBounds one directory request.
PROMVIEW_LOCAL_PASSWORD(unset)Password for promview user create / set-password when --password-stdin is not used.
PROMVIEW_SESSION_COOKIE_SECUREtrueMay be false only on loopback hosts. Accepts the former PROMVIEW_OIDC_COOKIE_SECURE as a deprecated alias.

See docs/okta-oidc.md⁠ for a worked provider setup.

⁠Kubernetes

A Helm chart is published beside the image and runs this exact image as a serialized pre-install and pre-upgrade migration hook:

helm upgrade --install promview oci://ghcr.io/cropalato/charts/promview \
  --namespace promview \
  --create-namespace \
  --version 0.1.0-beta.3

The chart version is the application version. Create the PostgreSQL Secret before installing. See docs/kubernetes.md⁠.

⁠Also published at

docker pull ghcr.io/cropalato/promview:beta

⁠Desktop client

The same console ships as a Tauri desktop and tray client for Linux and Windows. Installers are attached to each GitHub release⁠.

Tag summary

Content type

Image

Digest

sha256:386364ae9…

Size

10.2 MB

Last updated

8 days ago

docker pull cropalato/promview:beta