@checkstack/healthcheck-backend 1.21.3 → 1.23.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,717 @@
1
+ {
2
+ "id": "eebe119c-b4ad-4c2a-bde6-16b461da5a3a",
3
+ "prevId": "3794eb43-13ee-433d-bdff-4a61bec58606",
4
+ "version": "7",
5
+ "dialect": "postgresql",
6
+ "tables": {
7
+ "public.health_check_aggregates": {
8
+ "name": "health_check_aggregates",
9
+ "schema": "",
10
+ "columns": {
11
+ "id": {
12
+ "name": "id",
13
+ "type": "uuid",
14
+ "primaryKey": true,
15
+ "notNull": true,
16
+ "default": "gen_random_uuid()"
17
+ },
18
+ "configuration_id": {
19
+ "name": "configuration_id",
20
+ "type": "uuid",
21
+ "primaryKey": false,
22
+ "notNull": true
23
+ },
24
+ "system_id": {
25
+ "name": "system_id",
26
+ "type": "text",
27
+ "primaryKey": false,
28
+ "notNull": true
29
+ },
30
+ "environment_id": {
31
+ "name": "environment_id",
32
+ "type": "text",
33
+ "primaryKey": false,
34
+ "notNull": false
35
+ },
36
+ "bucket_start": {
37
+ "name": "bucket_start",
38
+ "type": "timestamp",
39
+ "primaryKey": false,
40
+ "notNull": true
41
+ },
42
+ "bucket_size": {
43
+ "name": "bucket_size",
44
+ "type": "bucket_size",
45
+ "typeSchema": "public",
46
+ "primaryKey": false,
47
+ "notNull": true
48
+ },
49
+ "run_count": {
50
+ "name": "run_count",
51
+ "type": "integer",
52
+ "primaryKey": false,
53
+ "notNull": true
54
+ },
55
+ "healthy_count": {
56
+ "name": "healthy_count",
57
+ "type": "integer",
58
+ "primaryKey": false,
59
+ "notNull": true
60
+ },
61
+ "degraded_count": {
62
+ "name": "degraded_count",
63
+ "type": "integer",
64
+ "primaryKey": false,
65
+ "notNull": true
66
+ },
67
+ "unhealthy_count": {
68
+ "name": "unhealthy_count",
69
+ "type": "integer",
70
+ "primaryKey": false,
71
+ "notNull": true
72
+ },
73
+ "latency_sum_ms": {
74
+ "name": "latency_sum_ms",
75
+ "type": "integer",
76
+ "primaryKey": false,
77
+ "notNull": false
78
+ },
79
+ "avg_latency_ms": {
80
+ "name": "avg_latency_ms",
81
+ "type": "integer",
82
+ "primaryKey": false,
83
+ "notNull": false
84
+ },
85
+ "min_latency_ms": {
86
+ "name": "min_latency_ms",
87
+ "type": "integer",
88
+ "primaryKey": false,
89
+ "notNull": false
90
+ },
91
+ "max_latency_ms": {
92
+ "name": "max_latency_ms",
93
+ "type": "integer",
94
+ "primaryKey": false,
95
+ "notNull": false
96
+ },
97
+ "p95_latency_ms": {
98
+ "name": "p95_latency_ms",
99
+ "type": "integer",
100
+ "primaryKey": false,
101
+ "notNull": false
102
+ },
103
+ "aggregated_result": {
104
+ "name": "aggregated_result",
105
+ "type": "jsonb",
106
+ "primaryKey": false,
107
+ "notNull": false
108
+ },
109
+ "tdigest_state": {
110
+ "name": "tdigest_state",
111
+ "type": "jsonb",
112
+ "primaryKey": false,
113
+ "notNull": false
114
+ },
115
+ "source_id": {
116
+ "name": "source_id",
117
+ "type": "text",
118
+ "primaryKey": false,
119
+ "notNull": false
120
+ },
121
+ "source_label": {
122
+ "name": "source_label",
123
+ "type": "text",
124
+ "primaryKey": false,
125
+ "notNull": false
126
+ }
127
+ },
128
+ "indexes": {
129
+ "health_check_aggregates_system_bucket_idx": {
130
+ "name": "health_check_aggregates_system_bucket_idx",
131
+ "columns": [
132
+ {
133
+ "expression": "system_id",
134
+ "isExpression": false,
135
+ "asc": true,
136
+ "nulls": "last"
137
+ },
138
+ {
139
+ "expression": "bucket_size",
140
+ "isExpression": false,
141
+ "asc": true,
142
+ "nulls": "last"
143
+ },
144
+ {
145
+ "expression": "bucket_start",
146
+ "isExpression": false,
147
+ "asc": true,
148
+ "nulls": "last"
149
+ }
150
+ ],
151
+ "isUnique": false,
152
+ "concurrently": false,
153
+ "method": "btree",
154
+ "with": {}
155
+ }
156
+ },
157
+ "foreignKeys": {
158
+ "health_check_aggregates_configuration_id_health_check_configurations_id_fk": {
159
+ "name": "health_check_aggregates_configuration_id_health_check_configurations_id_fk",
160
+ "tableFrom": "health_check_aggregates",
161
+ "tableTo": "health_check_configurations",
162
+ "columnsFrom": [
163
+ "configuration_id"
164
+ ],
165
+ "columnsTo": [
166
+ "id"
167
+ ],
168
+ "onDelete": "cascade",
169
+ "onUpdate": "no action"
170
+ }
171
+ },
172
+ "compositePrimaryKeys": {},
173
+ "uniqueConstraints": {
174
+ "health_check_aggregates_bucket_unique": {
175
+ "name": "health_check_aggregates_bucket_unique",
176
+ "nullsNotDistinct": true,
177
+ "columns": [
178
+ "configuration_id",
179
+ "system_id",
180
+ "environment_id",
181
+ "bucket_start",
182
+ "bucket_size",
183
+ "source_id"
184
+ ]
185
+ }
186
+ },
187
+ "policies": {},
188
+ "checkConstraints": {},
189
+ "isRLSEnabled": false
190
+ },
191
+ "public.health_check_configurations": {
192
+ "name": "health_check_configurations",
193
+ "schema": "",
194
+ "columns": {
195
+ "id": {
196
+ "name": "id",
197
+ "type": "uuid",
198
+ "primaryKey": true,
199
+ "notNull": true,
200
+ "default": "gen_random_uuid()"
201
+ },
202
+ "name": {
203
+ "name": "name",
204
+ "type": "text",
205
+ "primaryKey": false,
206
+ "notNull": true
207
+ },
208
+ "strategy_id": {
209
+ "name": "strategy_id",
210
+ "type": "text",
211
+ "primaryKey": false,
212
+ "notNull": true
213
+ },
214
+ "config": {
215
+ "name": "config",
216
+ "type": "jsonb",
217
+ "primaryKey": false,
218
+ "notNull": true
219
+ },
220
+ "collectors": {
221
+ "name": "collectors",
222
+ "type": "jsonb",
223
+ "primaryKey": false,
224
+ "notNull": false
225
+ },
226
+ "interval_seconds": {
227
+ "name": "interval_seconds",
228
+ "type": "integer",
229
+ "primaryKey": false,
230
+ "notNull": true
231
+ },
232
+ "is_template": {
233
+ "name": "is_template",
234
+ "type": "boolean",
235
+ "primaryKey": false,
236
+ "notNull": false,
237
+ "default": false
238
+ },
239
+ "paused": {
240
+ "name": "paused",
241
+ "type": "boolean",
242
+ "primaryKey": false,
243
+ "notNull": true,
244
+ "default": false
245
+ },
246
+ "created_at": {
247
+ "name": "created_at",
248
+ "type": "timestamp",
249
+ "primaryKey": false,
250
+ "notNull": true,
251
+ "default": "now()"
252
+ },
253
+ "updated_at": {
254
+ "name": "updated_at",
255
+ "type": "timestamp",
256
+ "primaryKey": false,
257
+ "notNull": true,
258
+ "default": "now()"
259
+ }
260
+ },
261
+ "indexes": {},
262
+ "foreignKeys": {},
263
+ "compositePrimaryKeys": {},
264
+ "uniqueConstraints": {},
265
+ "policies": {},
266
+ "checkConstraints": {},
267
+ "isRLSEnabled": false
268
+ },
269
+ "public.health_check_runs": {
270
+ "name": "health_check_runs",
271
+ "schema": "",
272
+ "columns": {
273
+ "id": {
274
+ "name": "id",
275
+ "type": "uuid",
276
+ "primaryKey": true,
277
+ "notNull": true,
278
+ "default": "gen_random_uuid()"
279
+ },
280
+ "configuration_id": {
281
+ "name": "configuration_id",
282
+ "type": "uuid",
283
+ "primaryKey": false,
284
+ "notNull": true
285
+ },
286
+ "system_id": {
287
+ "name": "system_id",
288
+ "type": "text",
289
+ "primaryKey": false,
290
+ "notNull": true
291
+ },
292
+ "environment_id": {
293
+ "name": "environment_id",
294
+ "type": "text",
295
+ "primaryKey": false,
296
+ "notNull": false
297
+ },
298
+ "status": {
299
+ "name": "status",
300
+ "type": "health_check_status",
301
+ "typeSchema": "public",
302
+ "primaryKey": false,
303
+ "notNull": true
304
+ },
305
+ "latency_ms": {
306
+ "name": "latency_ms",
307
+ "type": "integer",
308
+ "primaryKey": false,
309
+ "notNull": false
310
+ },
311
+ "result": {
312
+ "name": "result",
313
+ "type": "jsonb",
314
+ "primaryKey": false,
315
+ "notNull": false
316
+ },
317
+ "source_id": {
318
+ "name": "source_id",
319
+ "type": "text",
320
+ "primaryKey": false,
321
+ "notNull": false
322
+ },
323
+ "source_label": {
324
+ "name": "source_label",
325
+ "type": "text",
326
+ "primaryKey": false,
327
+ "notNull": false
328
+ },
329
+ "timestamp": {
330
+ "name": "timestamp",
331
+ "type": "timestamp",
332
+ "primaryKey": false,
333
+ "notNull": true,
334
+ "default": "now()"
335
+ }
336
+ },
337
+ "indexes": {
338
+ "health_check_runs_check_recent_idx": {
339
+ "name": "health_check_runs_check_recent_idx",
340
+ "columns": [
341
+ {
342
+ "expression": "system_id",
343
+ "isExpression": false,
344
+ "asc": true,
345
+ "nulls": "last"
346
+ },
347
+ {
348
+ "expression": "configuration_id",
349
+ "isExpression": false,
350
+ "asc": true,
351
+ "nulls": "last"
352
+ },
353
+ {
354
+ "expression": "timestamp",
355
+ "isExpression": false,
356
+ "asc": true,
357
+ "nulls": "last"
358
+ }
359
+ ],
360
+ "isUnique": false,
361
+ "concurrently": false,
362
+ "method": "btree",
363
+ "with": {}
364
+ },
365
+ "health_check_runs_slice_recent_idx": {
366
+ "name": "health_check_runs_slice_recent_idx",
367
+ "columns": [
368
+ {
369
+ "expression": "system_id",
370
+ "isExpression": false,
371
+ "asc": true,
372
+ "nulls": "last"
373
+ },
374
+ {
375
+ "expression": "configuration_id",
376
+ "isExpression": false,
377
+ "asc": true,
378
+ "nulls": "last"
379
+ },
380
+ {
381
+ "expression": "environment_id",
382
+ "isExpression": false,
383
+ "asc": true,
384
+ "nulls": "last"
385
+ },
386
+ {
387
+ "expression": "timestamp",
388
+ "isExpression": false,
389
+ "asc": true,
390
+ "nulls": "last"
391
+ }
392
+ ],
393
+ "isUnique": false,
394
+ "concurrently": false,
395
+ "method": "btree",
396
+ "with": {}
397
+ }
398
+ },
399
+ "foreignKeys": {
400
+ "health_check_runs_configuration_id_health_check_configurations_id_fk": {
401
+ "name": "health_check_runs_configuration_id_health_check_configurations_id_fk",
402
+ "tableFrom": "health_check_runs",
403
+ "tableTo": "health_check_configurations",
404
+ "columnsFrom": [
405
+ "configuration_id"
406
+ ],
407
+ "columnsTo": [
408
+ "id"
409
+ ],
410
+ "onDelete": "cascade",
411
+ "onUpdate": "no action"
412
+ }
413
+ },
414
+ "compositePrimaryKeys": {},
415
+ "uniqueConstraints": {},
416
+ "policies": {},
417
+ "checkConstraints": {},
418
+ "isRLSEnabled": false
419
+ },
420
+ "public.health_check_state_transitions": {
421
+ "name": "health_check_state_transitions",
422
+ "schema": "",
423
+ "columns": {
424
+ "id": {
425
+ "name": "id",
426
+ "type": "uuid",
427
+ "primaryKey": true,
428
+ "notNull": true,
429
+ "default": "gen_random_uuid()"
430
+ },
431
+ "system_id": {
432
+ "name": "system_id",
433
+ "type": "text",
434
+ "primaryKey": false,
435
+ "notNull": true
436
+ },
437
+ "configuration_id": {
438
+ "name": "configuration_id",
439
+ "type": "uuid",
440
+ "primaryKey": false,
441
+ "notNull": true
442
+ },
443
+ "environment_id": {
444
+ "name": "environment_id",
445
+ "type": "text",
446
+ "primaryKey": false,
447
+ "notNull": false
448
+ },
449
+ "from_status": {
450
+ "name": "from_status",
451
+ "type": "health_check_status",
452
+ "typeSchema": "public",
453
+ "primaryKey": false,
454
+ "notNull": false
455
+ },
456
+ "to_status": {
457
+ "name": "to_status",
458
+ "type": "health_check_status",
459
+ "typeSchema": "public",
460
+ "primaryKey": false,
461
+ "notNull": true
462
+ },
463
+ "transitioned_at": {
464
+ "name": "transitioned_at",
465
+ "type": "timestamp",
466
+ "primaryKey": false,
467
+ "notNull": true,
468
+ "default": "now()"
469
+ }
470
+ },
471
+ "indexes": {
472
+ "health_check_state_transitions_lookup_idx": {
473
+ "name": "health_check_state_transitions_lookup_idx",
474
+ "columns": [
475
+ {
476
+ "expression": "system_id",
477
+ "isExpression": false,
478
+ "asc": true,
479
+ "nulls": "last"
480
+ },
481
+ {
482
+ "expression": "environment_id",
483
+ "isExpression": false,
484
+ "asc": true,
485
+ "nulls": "last"
486
+ },
487
+ {
488
+ "expression": "to_status",
489
+ "isExpression": false,
490
+ "asc": true,
491
+ "nulls": "last"
492
+ },
493
+ {
494
+ "expression": "transitioned_at",
495
+ "isExpression": false,
496
+ "asc": true,
497
+ "nulls": "last"
498
+ }
499
+ ],
500
+ "isUnique": false,
501
+ "concurrently": false,
502
+ "method": "btree",
503
+ "with": {}
504
+ },
505
+ "health_check_state_transitions_system_recent_idx": {
506
+ "name": "health_check_state_transitions_system_recent_idx",
507
+ "columns": [
508
+ {
509
+ "expression": "system_id",
510
+ "isExpression": false,
511
+ "asc": true,
512
+ "nulls": "last"
513
+ },
514
+ {
515
+ "expression": "environment_id",
516
+ "isExpression": false,
517
+ "asc": true,
518
+ "nulls": "last"
519
+ },
520
+ {
521
+ "expression": "transitioned_at",
522
+ "isExpression": false,
523
+ "asc": true,
524
+ "nulls": "last"
525
+ }
526
+ ],
527
+ "isUnique": false,
528
+ "concurrently": false,
529
+ "method": "btree",
530
+ "with": {}
531
+ }
532
+ },
533
+ "foreignKeys": {
534
+ "health_check_state_transitions_configuration_id_health_check_configurations_id_fk": {
535
+ "name": "health_check_state_transitions_configuration_id_health_check_configurations_id_fk",
536
+ "tableFrom": "health_check_state_transitions",
537
+ "tableTo": "health_check_configurations",
538
+ "columnsFrom": [
539
+ "configuration_id"
540
+ ],
541
+ "columnsTo": [
542
+ "id"
543
+ ],
544
+ "onDelete": "cascade",
545
+ "onUpdate": "no action"
546
+ }
547
+ },
548
+ "compositePrimaryKeys": {},
549
+ "uniqueConstraints": {},
550
+ "policies": {},
551
+ "checkConstraints": {},
552
+ "isRLSEnabled": false
553
+ },
554
+ "public.system_health_checks": {
555
+ "name": "system_health_checks",
556
+ "schema": "",
557
+ "columns": {
558
+ "system_id": {
559
+ "name": "system_id",
560
+ "type": "text",
561
+ "primaryKey": false,
562
+ "notNull": true
563
+ },
564
+ "configuration_id": {
565
+ "name": "configuration_id",
566
+ "type": "uuid",
567
+ "primaryKey": false,
568
+ "notNull": true
569
+ },
570
+ "enabled": {
571
+ "name": "enabled",
572
+ "type": "boolean",
573
+ "primaryKey": false,
574
+ "notNull": true,
575
+ "default": true
576
+ },
577
+ "state_thresholds": {
578
+ "name": "state_thresholds",
579
+ "type": "jsonb",
580
+ "primaryKey": false,
581
+ "notNull": false
582
+ },
583
+ "retention_config": {
584
+ "name": "retention_config",
585
+ "type": "jsonb",
586
+ "primaryKey": false,
587
+ "notNull": false
588
+ },
589
+ "satellite_ids": {
590
+ "name": "satellite_ids",
591
+ "type": "jsonb",
592
+ "primaryKey": false,
593
+ "notNull": false
594
+ },
595
+ "environment_ids": {
596
+ "name": "environment_ids",
597
+ "type": "jsonb",
598
+ "primaryKey": false,
599
+ "notNull": false
600
+ },
601
+ "satellite_environment_ids": {
602
+ "name": "satellite_environment_ids",
603
+ "type": "jsonb",
604
+ "primaryKey": false,
605
+ "notNull": false
606
+ },
607
+ "include_local": {
608
+ "name": "include_local",
609
+ "type": "boolean",
610
+ "primaryKey": false,
611
+ "notNull": true,
612
+ "default": true
613
+ },
614
+ "notification_policy": {
615
+ "name": "notification_policy",
616
+ "type": "jsonb",
617
+ "primaryKey": false,
618
+ "notNull": false
619
+ },
620
+ "created_at": {
621
+ "name": "created_at",
622
+ "type": "timestamp",
623
+ "primaryKey": false,
624
+ "notNull": true,
625
+ "default": "now()"
626
+ },
627
+ "updated_at": {
628
+ "name": "updated_at",
629
+ "type": "timestamp",
630
+ "primaryKey": false,
631
+ "notNull": true,
632
+ "default": "now()"
633
+ }
634
+ },
635
+ "indexes": {
636
+ "system_health_checks_config_enabled_idx": {
637
+ "name": "system_health_checks_config_enabled_idx",
638
+ "columns": [
639
+ {
640
+ "expression": "configuration_id",
641
+ "isExpression": false,
642
+ "asc": true,
643
+ "nulls": "last"
644
+ },
645
+ {
646
+ "expression": "enabled",
647
+ "isExpression": false,
648
+ "asc": true,
649
+ "nulls": "last"
650
+ }
651
+ ],
652
+ "isUnique": false,
653
+ "concurrently": false,
654
+ "method": "btree",
655
+ "with": {}
656
+ }
657
+ },
658
+ "foreignKeys": {
659
+ "system_health_checks_configuration_id_health_check_configurations_id_fk": {
660
+ "name": "system_health_checks_configuration_id_health_check_configurations_id_fk",
661
+ "tableFrom": "system_health_checks",
662
+ "tableTo": "health_check_configurations",
663
+ "columnsFrom": [
664
+ "configuration_id"
665
+ ],
666
+ "columnsTo": [
667
+ "id"
668
+ ],
669
+ "onDelete": "cascade",
670
+ "onUpdate": "no action"
671
+ }
672
+ },
673
+ "compositePrimaryKeys": {
674
+ "system_health_checks_system_id_configuration_id_pk": {
675
+ "name": "system_health_checks_system_id_configuration_id_pk",
676
+ "columns": [
677
+ "system_id",
678
+ "configuration_id"
679
+ ]
680
+ }
681
+ },
682
+ "uniqueConstraints": {},
683
+ "policies": {},
684
+ "checkConstraints": {},
685
+ "isRLSEnabled": false
686
+ }
687
+ },
688
+ "enums": {
689
+ "public.bucket_size": {
690
+ "name": "bucket_size",
691
+ "schema": "public",
692
+ "values": [
693
+ "hourly",
694
+ "daily"
695
+ ]
696
+ },
697
+ "public.health_check_status": {
698
+ "name": "health_check_status",
699
+ "schema": "public",
700
+ "values": [
701
+ "healthy",
702
+ "unhealthy",
703
+ "degraded"
704
+ ]
705
+ }
706
+ },
707
+ "schemas": {},
708
+ "sequences": {},
709
+ "roles": {},
710
+ "policies": {},
711
+ "views": {},
712
+ "_meta": {
713
+ "columns": {},
714
+ "schemas": {},
715
+ "tables": {}
716
+ }
717
+ }