@checkstack/healthcheck-backend 1.1.4 → 1.2.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,615 @@
1
+ {
2
+ "id": "724bdcf9-4cc4-4879-a94a-0bbb0138d207",
3
+ "prevId": "7fabe9e0-a078-43fa-aa33-548b1f6f7ee9",
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
+ "bucket_start": {
31
+ "name": "bucket_start",
32
+ "type": "timestamp",
33
+ "primaryKey": false,
34
+ "notNull": true
35
+ },
36
+ "bucket_size": {
37
+ "name": "bucket_size",
38
+ "type": "bucket_size",
39
+ "typeSchema": "public",
40
+ "primaryKey": false,
41
+ "notNull": true
42
+ },
43
+ "run_count": {
44
+ "name": "run_count",
45
+ "type": "integer",
46
+ "primaryKey": false,
47
+ "notNull": true
48
+ },
49
+ "healthy_count": {
50
+ "name": "healthy_count",
51
+ "type": "integer",
52
+ "primaryKey": false,
53
+ "notNull": true
54
+ },
55
+ "degraded_count": {
56
+ "name": "degraded_count",
57
+ "type": "integer",
58
+ "primaryKey": false,
59
+ "notNull": true
60
+ },
61
+ "unhealthy_count": {
62
+ "name": "unhealthy_count",
63
+ "type": "integer",
64
+ "primaryKey": false,
65
+ "notNull": true
66
+ },
67
+ "latency_sum_ms": {
68
+ "name": "latency_sum_ms",
69
+ "type": "integer",
70
+ "primaryKey": false,
71
+ "notNull": false
72
+ },
73
+ "avg_latency_ms": {
74
+ "name": "avg_latency_ms",
75
+ "type": "integer",
76
+ "primaryKey": false,
77
+ "notNull": false
78
+ },
79
+ "min_latency_ms": {
80
+ "name": "min_latency_ms",
81
+ "type": "integer",
82
+ "primaryKey": false,
83
+ "notNull": false
84
+ },
85
+ "max_latency_ms": {
86
+ "name": "max_latency_ms",
87
+ "type": "integer",
88
+ "primaryKey": false,
89
+ "notNull": false
90
+ },
91
+ "p95_latency_ms": {
92
+ "name": "p95_latency_ms",
93
+ "type": "integer",
94
+ "primaryKey": false,
95
+ "notNull": false
96
+ },
97
+ "aggregated_result": {
98
+ "name": "aggregated_result",
99
+ "type": "jsonb",
100
+ "primaryKey": false,
101
+ "notNull": false
102
+ },
103
+ "tdigest_state": {
104
+ "name": "tdigest_state",
105
+ "type": "jsonb",
106
+ "primaryKey": false,
107
+ "notNull": false
108
+ },
109
+ "source_id": {
110
+ "name": "source_id",
111
+ "type": "text",
112
+ "primaryKey": false,
113
+ "notNull": false
114
+ },
115
+ "source_label": {
116
+ "name": "source_label",
117
+ "type": "text",
118
+ "primaryKey": false,
119
+ "notNull": false
120
+ }
121
+ },
122
+ "indexes": {},
123
+ "foreignKeys": {
124
+ "health_check_aggregates_configuration_id_health_check_configurations_id_fk": {
125
+ "name": "health_check_aggregates_configuration_id_health_check_configurations_id_fk",
126
+ "tableFrom": "health_check_aggregates",
127
+ "tableTo": "health_check_configurations",
128
+ "columnsFrom": [
129
+ "configuration_id"
130
+ ],
131
+ "columnsTo": [
132
+ "id"
133
+ ],
134
+ "onDelete": "cascade",
135
+ "onUpdate": "no action"
136
+ }
137
+ },
138
+ "compositePrimaryKeys": {},
139
+ "uniqueConstraints": {
140
+ "health_check_aggregates_bucket_unique": {
141
+ "name": "health_check_aggregates_bucket_unique",
142
+ "nullsNotDistinct": true,
143
+ "columns": [
144
+ "configuration_id",
145
+ "system_id",
146
+ "bucket_start",
147
+ "bucket_size",
148
+ "source_id"
149
+ ]
150
+ }
151
+ },
152
+ "policies": {},
153
+ "checkConstraints": {},
154
+ "isRLSEnabled": false
155
+ },
156
+ "public.health_check_auto_incidents": {
157
+ "name": "health_check_auto_incidents",
158
+ "schema": "",
159
+ "columns": {
160
+ "id": {
161
+ "name": "id",
162
+ "type": "uuid",
163
+ "primaryKey": true,
164
+ "notNull": true,
165
+ "default": "gen_random_uuid()"
166
+ },
167
+ "incident_id": {
168
+ "name": "incident_id",
169
+ "type": "uuid",
170
+ "primaryKey": false,
171
+ "notNull": true
172
+ },
173
+ "system_id": {
174
+ "name": "system_id",
175
+ "type": "text",
176
+ "primaryKey": false,
177
+ "notNull": true
178
+ },
179
+ "configuration_id": {
180
+ "name": "configuration_id",
181
+ "type": "uuid",
182
+ "primaryKey": false,
183
+ "notNull": true
184
+ },
185
+ "opened_at": {
186
+ "name": "opened_at",
187
+ "type": "timestamp",
188
+ "primaryKey": false,
189
+ "notNull": true,
190
+ "default": "now()"
191
+ },
192
+ "closed_at": {
193
+ "name": "closed_at",
194
+ "type": "timestamp",
195
+ "primaryKey": false,
196
+ "notNull": false
197
+ }
198
+ },
199
+ "indexes": {
200
+ "health_check_auto_incidents_active_by_system_idx": {
201
+ "name": "health_check_auto_incidents_active_by_system_idx",
202
+ "columns": [
203
+ {
204
+ "expression": "system_id",
205
+ "isExpression": false,
206
+ "asc": true,
207
+ "nulls": "last"
208
+ },
209
+ {
210
+ "expression": "closed_at",
211
+ "isExpression": false,
212
+ "asc": true,
213
+ "nulls": "last"
214
+ }
215
+ ],
216
+ "isUnique": false,
217
+ "concurrently": false,
218
+ "method": "btree",
219
+ "with": {}
220
+ }
221
+ },
222
+ "foreignKeys": {
223
+ "health_check_auto_incidents_configuration_id_health_check_configurations_id_fk": {
224
+ "name": "health_check_auto_incidents_configuration_id_health_check_configurations_id_fk",
225
+ "tableFrom": "health_check_auto_incidents",
226
+ "tableTo": "health_check_configurations",
227
+ "columnsFrom": [
228
+ "configuration_id"
229
+ ],
230
+ "columnsTo": [
231
+ "id"
232
+ ],
233
+ "onDelete": "cascade",
234
+ "onUpdate": "no action"
235
+ }
236
+ },
237
+ "compositePrimaryKeys": {},
238
+ "uniqueConstraints": {},
239
+ "policies": {},
240
+ "checkConstraints": {},
241
+ "isRLSEnabled": false
242
+ },
243
+ "public.health_check_configurations": {
244
+ "name": "health_check_configurations",
245
+ "schema": "",
246
+ "columns": {
247
+ "id": {
248
+ "name": "id",
249
+ "type": "uuid",
250
+ "primaryKey": true,
251
+ "notNull": true,
252
+ "default": "gen_random_uuid()"
253
+ },
254
+ "name": {
255
+ "name": "name",
256
+ "type": "text",
257
+ "primaryKey": false,
258
+ "notNull": true
259
+ },
260
+ "strategy_id": {
261
+ "name": "strategy_id",
262
+ "type": "text",
263
+ "primaryKey": false,
264
+ "notNull": true
265
+ },
266
+ "config": {
267
+ "name": "config",
268
+ "type": "jsonb",
269
+ "primaryKey": false,
270
+ "notNull": true
271
+ },
272
+ "collectors": {
273
+ "name": "collectors",
274
+ "type": "jsonb",
275
+ "primaryKey": false,
276
+ "notNull": false
277
+ },
278
+ "interval_seconds": {
279
+ "name": "interval_seconds",
280
+ "type": "integer",
281
+ "primaryKey": false,
282
+ "notNull": true
283
+ },
284
+ "is_template": {
285
+ "name": "is_template",
286
+ "type": "boolean",
287
+ "primaryKey": false,
288
+ "notNull": false,
289
+ "default": false
290
+ },
291
+ "paused": {
292
+ "name": "paused",
293
+ "type": "boolean",
294
+ "primaryKey": false,
295
+ "notNull": true,
296
+ "default": false
297
+ },
298
+ "created_at": {
299
+ "name": "created_at",
300
+ "type": "timestamp",
301
+ "primaryKey": false,
302
+ "notNull": true,
303
+ "default": "now()"
304
+ },
305
+ "updated_at": {
306
+ "name": "updated_at",
307
+ "type": "timestamp",
308
+ "primaryKey": false,
309
+ "notNull": true,
310
+ "default": "now()"
311
+ }
312
+ },
313
+ "indexes": {},
314
+ "foreignKeys": {},
315
+ "compositePrimaryKeys": {},
316
+ "uniqueConstraints": {},
317
+ "policies": {},
318
+ "checkConstraints": {},
319
+ "isRLSEnabled": false
320
+ },
321
+ "public.health_check_runs": {
322
+ "name": "health_check_runs",
323
+ "schema": "",
324
+ "columns": {
325
+ "id": {
326
+ "name": "id",
327
+ "type": "uuid",
328
+ "primaryKey": true,
329
+ "notNull": true,
330
+ "default": "gen_random_uuid()"
331
+ },
332
+ "configuration_id": {
333
+ "name": "configuration_id",
334
+ "type": "uuid",
335
+ "primaryKey": false,
336
+ "notNull": true
337
+ },
338
+ "system_id": {
339
+ "name": "system_id",
340
+ "type": "text",
341
+ "primaryKey": false,
342
+ "notNull": true
343
+ },
344
+ "status": {
345
+ "name": "status",
346
+ "type": "health_check_status",
347
+ "typeSchema": "public",
348
+ "primaryKey": false,
349
+ "notNull": true
350
+ },
351
+ "latency_ms": {
352
+ "name": "latency_ms",
353
+ "type": "integer",
354
+ "primaryKey": false,
355
+ "notNull": false
356
+ },
357
+ "result": {
358
+ "name": "result",
359
+ "type": "jsonb",
360
+ "primaryKey": false,
361
+ "notNull": false
362
+ },
363
+ "source_id": {
364
+ "name": "source_id",
365
+ "type": "text",
366
+ "primaryKey": false,
367
+ "notNull": false
368
+ },
369
+ "source_label": {
370
+ "name": "source_label",
371
+ "type": "text",
372
+ "primaryKey": false,
373
+ "notNull": false
374
+ },
375
+ "timestamp": {
376
+ "name": "timestamp",
377
+ "type": "timestamp",
378
+ "primaryKey": false,
379
+ "notNull": true,
380
+ "default": "now()"
381
+ }
382
+ },
383
+ "indexes": {},
384
+ "foreignKeys": {
385
+ "health_check_runs_configuration_id_health_check_configurations_id_fk": {
386
+ "name": "health_check_runs_configuration_id_health_check_configurations_id_fk",
387
+ "tableFrom": "health_check_runs",
388
+ "tableTo": "health_check_configurations",
389
+ "columnsFrom": [
390
+ "configuration_id"
391
+ ],
392
+ "columnsTo": [
393
+ "id"
394
+ ],
395
+ "onDelete": "cascade",
396
+ "onUpdate": "no action"
397
+ }
398
+ },
399
+ "compositePrimaryKeys": {},
400
+ "uniqueConstraints": {},
401
+ "policies": {},
402
+ "checkConstraints": {},
403
+ "isRLSEnabled": false
404
+ },
405
+ "public.health_check_unhealthy_transitions": {
406
+ "name": "health_check_unhealthy_transitions",
407
+ "schema": "",
408
+ "columns": {
409
+ "id": {
410
+ "name": "id",
411
+ "type": "uuid",
412
+ "primaryKey": true,
413
+ "notNull": true,
414
+ "default": "gen_random_uuid()"
415
+ },
416
+ "configuration_id": {
417
+ "name": "configuration_id",
418
+ "type": "uuid",
419
+ "primaryKey": false,
420
+ "notNull": true
421
+ },
422
+ "system_id": {
423
+ "name": "system_id",
424
+ "type": "text",
425
+ "primaryKey": false,
426
+ "notNull": true
427
+ },
428
+ "transitioned_at": {
429
+ "name": "transitioned_at",
430
+ "type": "timestamp",
431
+ "primaryKey": false,
432
+ "notNull": true,
433
+ "default": "now()"
434
+ }
435
+ },
436
+ "indexes": {
437
+ "health_check_unhealthy_transitions_lookup_idx": {
438
+ "name": "health_check_unhealthy_transitions_lookup_idx",
439
+ "columns": [
440
+ {
441
+ "expression": "configuration_id",
442
+ "isExpression": false,
443
+ "asc": true,
444
+ "nulls": "last"
445
+ },
446
+ {
447
+ "expression": "system_id",
448
+ "isExpression": false,
449
+ "asc": true,
450
+ "nulls": "last"
451
+ },
452
+ {
453
+ "expression": "transitioned_at",
454
+ "isExpression": false,
455
+ "asc": true,
456
+ "nulls": "last"
457
+ }
458
+ ],
459
+ "isUnique": false,
460
+ "concurrently": false,
461
+ "method": "btree",
462
+ "with": {}
463
+ }
464
+ },
465
+ "foreignKeys": {
466
+ "health_check_unhealthy_transitions_configuration_id_health_check_configurations_id_fk": {
467
+ "name": "health_check_unhealthy_transitions_configuration_id_health_check_configurations_id_fk",
468
+ "tableFrom": "health_check_unhealthy_transitions",
469
+ "tableTo": "health_check_configurations",
470
+ "columnsFrom": [
471
+ "configuration_id"
472
+ ],
473
+ "columnsTo": [
474
+ "id"
475
+ ],
476
+ "onDelete": "cascade",
477
+ "onUpdate": "no action"
478
+ }
479
+ },
480
+ "compositePrimaryKeys": {},
481
+ "uniqueConstraints": {},
482
+ "policies": {},
483
+ "checkConstraints": {},
484
+ "isRLSEnabled": false
485
+ },
486
+ "public.system_health_checks": {
487
+ "name": "system_health_checks",
488
+ "schema": "",
489
+ "columns": {
490
+ "system_id": {
491
+ "name": "system_id",
492
+ "type": "text",
493
+ "primaryKey": false,
494
+ "notNull": true
495
+ },
496
+ "configuration_id": {
497
+ "name": "configuration_id",
498
+ "type": "uuid",
499
+ "primaryKey": false,
500
+ "notNull": true
501
+ },
502
+ "enabled": {
503
+ "name": "enabled",
504
+ "type": "boolean",
505
+ "primaryKey": false,
506
+ "notNull": true,
507
+ "default": true
508
+ },
509
+ "state_thresholds": {
510
+ "name": "state_thresholds",
511
+ "type": "jsonb",
512
+ "primaryKey": false,
513
+ "notNull": false
514
+ },
515
+ "retention_config": {
516
+ "name": "retention_config",
517
+ "type": "jsonb",
518
+ "primaryKey": false,
519
+ "notNull": false
520
+ },
521
+ "satellite_ids": {
522
+ "name": "satellite_ids",
523
+ "type": "jsonb",
524
+ "primaryKey": false,
525
+ "notNull": false
526
+ },
527
+ "include_local": {
528
+ "name": "include_local",
529
+ "type": "boolean",
530
+ "primaryKey": false,
531
+ "notNull": true,
532
+ "default": true
533
+ },
534
+ "notification_policy": {
535
+ "name": "notification_policy",
536
+ "type": "jsonb",
537
+ "primaryKey": false,
538
+ "notNull": false
539
+ },
540
+ "created_at": {
541
+ "name": "created_at",
542
+ "type": "timestamp",
543
+ "primaryKey": false,
544
+ "notNull": true,
545
+ "default": "now()"
546
+ },
547
+ "updated_at": {
548
+ "name": "updated_at",
549
+ "type": "timestamp",
550
+ "primaryKey": false,
551
+ "notNull": true,
552
+ "default": "now()"
553
+ }
554
+ },
555
+ "indexes": {},
556
+ "foreignKeys": {
557
+ "system_health_checks_configuration_id_health_check_configurations_id_fk": {
558
+ "name": "system_health_checks_configuration_id_health_check_configurations_id_fk",
559
+ "tableFrom": "system_health_checks",
560
+ "tableTo": "health_check_configurations",
561
+ "columnsFrom": [
562
+ "configuration_id"
563
+ ],
564
+ "columnsTo": [
565
+ "id"
566
+ ],
567
+ "onDelete": "cascade",
568
+ "onUpdate": "no action"
569
+ }
570
+ },
571
+ "compositePrimaryKeys": {
572
+ "system_health_checks_system_id_configuration_id_pk": {
573
+ "name": "system_health_checks_system_id_configuration_id_pk",
574
+ "columns": [
575
+ "system_id",
576
+ "configuration_id"
577
+ ]
578
+ }
579
+ },
580
+ "uniqueConstraints": {},
581
+ "policies": {},
582
+ "checkConstraints": {},
583
+ "isRLSEnabled": false
584
+ }
585
+ },
586
+ "enums": {
587
+ "public.bucket_size": {
588
+ "name": "bucket_size",
589
+ "schema": "public",
590
+ "values": [
591
+ "hourly",
592
+ "daily"
593
+ ]
594
+ },
595
+ "public.health_check_status": {
596
+ "name": "health_check_status",
597
+ "schema": "public",
598
+ "values": [
599
+ "healthy",
600
+ "unhealthy",
601
+ "degraded"
602
+ ]
603
+ }
604
+ },
605
+ "schemas": {},
606
+ "sequences": {},
607
+ "roles": {},
608
+ "policies": {},
609
+ "views": {},
610
+ "_meta": {
611
+ "columns": {},
612
+ "schemas": {},
613
+ "tables": {}
614
+ }
615
+ }