Keep a history of integration figures and draw it on each integration's page
The numbers integrations report (queries and blocked share, queue and missing items, speeds, photos, documents, failed runs, firing rules, targets down, monthly cost and more) are kept about every quarter of an hour for five weeks, then as hours and days for up to two years, taken from each integration's stored reading. Every card on the 14 integration pages gets a Show the history button with a chart per figure, how it changed and its lowest and highest. A stretch when the integration could not be read is a gap. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
e4f3a54189
commit
e7f23ba13f
30 files changed
+10532
-1
No files matched your search
+21
@@ -336,6 +336,26 @@ A chart over up to 35 days is drawn from the samples, up to 120 from the hours,
|
||||
|
||||
Index **`server_metrics_lookup_idx`** on (`server_id`, `metric`, `recorded_at`).
|
||||
|
||||
#### `integration_figures`
|
||||
|
||||
A number an integration reports (queries a day, items in a queue, photos …), one row for each, so its history can be drawn (services/integrationFigures.ts).
|
||||
|
||||
| Column | Type | Notes |
|
||||
|---|---|---|
|
||||
| `id` | integer PK | |
|
||||
| `integration_id` | integer NOT NULL | → `integrations.id`, deleted with it. |
|
||||
| `key`, `label` | text NOT NULL | The figure's name within its kind of integration (`queries`, `photos` …) and what it is called on the page. Unique together with `integration_id`. |
|
||||
| `unit` | text NOT NULL | `count`, `percent`, `ms`, `bytes`, `bytes_per_s` or `money:<currency>`. |
|
||||
| `latest`, `updated_at` | real, text NOT NULL | The last reading, and when it was read (ISO). |
|
||||
|
||||
#### `integration_figure_samples`
|
||||
|
||||
One reading of a figure about every quarter of an hour, kept five weeks. `figure_id` → `integration_figures.id` (deleted with it), `at` (ISO), `value`. Index on (`figure_id`, `at`).
|
||||
|
||||
#### `integration_figure_rollup`
|
||||
|
||||
The same, coarser and longer, as `server_metrics_rollup` is: one row for each figure and hour (`grain` `h`, four months) or day (`d`, about two years) — `sum`, `n`, `min`, `max`; primary key (`figure_id`, `grain`, `at`).
|
||||
|
||||
#### `server_ports`
|
||||
|
||||
A port on one server that's been seen open by a scan, or that someone wrote a
|
||||
@@ -1710,6 +1730,7 @@ are deleted), and `notification_queue` is emptied each time the quiet-hours dige
|
||||
|---|---|
|
||||
| `server_metrics` | 35 days of samples |
|
||||
| `server_metrics_rollup` | hourly rows 120 days, daily rows about 800 days |
|
||||
| `integration_figure_samples`, `integration_figure_rollup` | 35 days of readings; hourly rows 120 days, daily rows about 800 days |
|
||||
| `endpoint_results` | 14 days of every answer |
|
||||
| `endpoint_hourly`, `endpoint_daily` | 120 days, and 800 days |
|
||||
| `storage_samples` | 400 days (a pool not reported for 30 days is deleted with its readings) |
|
||||
|
||||
Reference in new issue
Block a user