Skip to content

Remove the Prometheus/Gatus status integration and the home-page uptime strip #400

Closed

Description

@mchestr

Problem

The member home page shows a 7-day uptime strip, and members can get an "outage" notice. Both come from an optional Prometheus integration: an admin enters a Prometheus URL and a PromQL query (in practice, the Gatus uptime metrics), and the app reads 168 hourly up/down points from it. The code never refers to Gatus by name. It only stores a Prometheus row with name, url and query.

We don't want to keep this. It adds a setup-wizard step, an admin integration, a database model and a home-page section, and the uptime display isn't needed.

Proposal

Remove the Prometheus status integration from end to end: the setup step, the admin settings entry, the stored config, the status action, the uptime strip and the outage notice.

Out of scope, keep as is: the app's own Prometheus exporter at /api/metrics (app/api/metrics/route.ts, lib/observability/metrics.ts, lib/observability/prometheus-text.ts, METRICS_TOKEN). It's unrelated to the uptime feature.

Scope

Status data and UI

  • actions/prometheus-status.ts and __tests__/actions/prometheus-status.test.ts
  • components/ui/uptime-strip.tsx, components/ui/__tests__/uptime-strip.test.tsx, lib/ui/uptime.ts
  • components/dashboard/home-page.tsx: remove <UptimeStrip> and update the layout JSDoc
  • lib/member/home-data.ts (+ test): remove uptime / getPrometheusStatus()
  • lib/member/notice.ts (+ test): remove the Prometheus-driven outage notice

Integration plumbing

  • lib/connections/prometheus.ts (+ test), lib/validations/prometheus.ts
  • lib/services/descriptors.ts: remove the prometheus ServiceKind and its descriptor. Then follow the type errors through lib/services/service-save.ts, lib/settings/{connection-health,connection-status,test-service,audit-meta}.ts, lib/connections/http.ts, lib/ui/icons.ts, actions/admin/admin-servers.ts, lib/data/admin-settings.ts and app/admin/settings/page.tsx
  • components/admin/settings/sections/other-integrations-section.tsx, components/admin/settings/server-form.tsx, hooks/admin/use-server-form.ts: remove the Prometheus option and the query field

Setup wizard

  • types/setup.ts: remove the prometheus step and PrometheusDefaults
  • actions/setup.ts, lib/setup/wizard-data.ts, lib/setup/dev-defaults.ts (the DEV_PROMETHEUS_* vars), and components/setup/setup-wizard/* (setup-wizard.tsx, service-connection-form.tsx, setup-step-frame.tsx, use-setup-service-form.ts)
  • Check prisma/migrations/20270117000010_p1024_setup_step_ids and prisma/__tests__/setup-step-ids.pg.test.ts: existing installs may have prometheus recorded as a completed or skipped step, and the wizard must still handle that

Database

  • Drop model Prometheus from prisma/schema.prisma with a new migration (prisma migrate dev --create-only --name drop_prometheus_status). Don't edit 20251208000000_add_prometheus.

Env and docs

  • lib/env.ts: reword SKIP_CONNECTION_TESTS ("skips live Plex and Prometheus checks") to just Plex, then run npm run env:docs to regenerate docs/environment.md and example.env
  • README.md (setup wizard paragraph), docs/deployment.md, docs/operations.md, docs/privacy.md, CLAUDE.md: remove references to the uptime or status integration, but keep the /api/metrics docs
  • CHANGELOG.md: add a line under Unreleased. The Changelog check requires it for the migration. Add an Upgrade note that the stored Prometheus status config is dropped.

Tests

  • Update the affected suites: __tests__/actions/setup.test.ts, __tests__/security/setup-actions-security.test.ts, actions/__tests__/{admin-servers,admin-settings-secret-hiding,test-connection}.test.ts, components/admin/settings/__tests__/server-form.test.tsx, the setup-wizard component tests, lib/settings/__tests__/*, lib/ui/__tests__/icons.test.ts, lib/security/__tests__/config-diff.test.ts, types/__tests__/setup-steps.test.ts, __tests__/app/home-page.test.tsx
  • E2E: e2e/setup-wizard.spec.ts and e2e/helpers/seed-fixtures.ts
  • Visual baselines for the home page will change, so refresh them through the Visual Baselines workflow
  • Coverage floors may drop slightly once these files are deleted, so check jest.coverage-thresholds.json

Acceptance criteria

  • The home page shows no uptime strip, and no outage notice comes from Prometheus
  • Prometheus no longer appears in the setup wizard or in Admin, Settings, Other integrations
  • The Prometheus table is dropped by a new migration, and an existing install upgrades cleanly, including one whose setup progress recorded the prometheus step
  • /api/metrics still works exactly as before
  • Lint, typecheck, knip, design check, unit, integration and E2E all pass

Activity

  1. added
    refactor
    database
    admin-ui
    observability
    on Oct 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    admin-uidatabaseobservabilityrefactor

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions