Skip to content

Manage BetterStack dashboard queries + alerts in git #629

Description

@silent-cipher

Background

The SQL queries and alerts behind our two main dealbot dashboards live only in the BetterStack UI. Than means:

  • No version history – we can't see what a query looked like last week or who change it.
  • No review – query/alert changes ship with nobody else looking.
  • No diffing or easy revert.

Proposal (deliberately minimal)

Mirror the chart queries and alerts in this repo and gate changes behind a PR. No new infra or automation right not.

  1. One-time-export of all chart queries + alerts from BetterStack into the repo.
  2. Every change to a chart query or alert goes through a PR with 1 approval from a teammate.
  3. After approval: apply the change in BetterStack, then merge the PR.

The win: reviewable, versioned, revertable queries and alerts.

In scope

The two main dashboards:

Dashboard ID Charts Source
Operational 618457 17 Infra Prod
Provider 624265 49 Infra Staging

Both their chart SQL and their alerts.

Proposed repo layout

docs/dashboards/
  operational/
    charts/<chart-name>.sql
    alerts/<alert-name>.json
  provider/
    charts/<chart-name>.sql
    alerts/<alert-name>.json
  • One .sql file per chart query.
  • One JSON file per alert (threshold / condition / notification target diffs cleanly as structured data, not prose).
  • Chart/alert files keyed by their stable Better Stack numeric ID (in the file or a small index) so we always know which live object a file maps to.

Workflow

open PR → 1 teammate approves → apply change in Better Stack → merge

main always reflects the last approved-and-applied state.

Tasks

  • Export Operational + Provider dashboard charts -> charts/ & alerts -> alerts/
  • Add a per-file mapping to Better Stack chart/alert IDs
  • Document the PR-gated change workflow in docs/dashboards/README.md

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    Status
    📌 Triage

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions