FilOzone / FilOzone/dealbot

Manage BetterStack dashboard queries + alerts in git

Open
#629 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
3
Forks
9
Avg merge
4d 14h
Merged PRs (30d)
6

Description

## 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/.sql
alerts/.json
provider/
charts/.sql
alerts/.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`

Contributor guide

No contributing guide indexed for this repository

Research direction

Start in BetterStack by identifying the charts and alerts for dashboards 618457 and 624265, then export them into docs/dashboards/ using the proposed operational and provider layout. Add stable Better Stack chart and alert IDs per file, and document the one-approval workflow in docs/dashboards/README.md. Done means all 66 charts and their alerts are represented and the workflow is documented.

Written by the indexing model from the issue text.

Assessment

Tech stack
sql
Domain
documentation, observability
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.