0
0
Fork 0
mirror of https://github.com/healthchecks/healthchecks.git synced 2025-04-17 18:22:33 +00:00
healthchecks_healthchecks/hc/api/migrations
Pēteris Caune 7458770b41
Improve alerting logic when run IDs are used
* Add Check.last_start_rid field
* Fill Check.last_start_rid on every start event
* Clear Check.last_start on every "fail" event
* Clear Check.last_start on success event if either case is true:
 - the event's rid matches Check.last_start_rid
 - the event does not specify rid

In human terms, the alerting logic will be: we track the
execution time of the most recent "start" event only. It would
take a major redesign to track the execution time of all
concurrent "start" events and send alerts when *any* of them
overshoots the time budget. So, whenever we see a "start" event,
the timer resets.

Example:

* 00:00 client sends start signal with rid=A, timer starts
* 00:10 client sends start signal with rid=B, timer resets
* 00:20 client sends success signal with rid=A, timer
  does not reset because rid A does not match the rid seen in
  the most recent start signal (it was B)
* 00:30 the grace time runs out, the check's status shows
  as started + failed

At this point the check can be reset to a healthy state in 3
different ways:

* send a success signal with rid=B
* send a failure signal with any rid value or without it
* send a success signal without a rid value
2022-11-09 19:01:22 +02:00
..
0001_initial.py Source formatted with Black 2019-05-15 14:27:50 +03:00
0002_auto_20150616_0732.py Added duration to ping details () 2022-11-01 09:18:34 +02:00
0003_auto_20150616_1249.py Added duration to ping details () 2022-11-01 09:18:34 +02:00
0004_auto_20150616_1319.py Source formatted with Black 2019-05-15 14:27:50 +03:00
0005_auto_20150630_2021.py Source formatted with Black 2019-05-15 14:27:50 +03:00
0006_check_grace.py Added duration to ping details () 2022-11-01 09:18:34 +02:00
0007_ping.py Source formatted with Black 2019-05-15 14:27:50 +03:00
0008_auto_20150801_1213.py Source formatted with Black 2019-05-15 14:27:50 +03:00
0009_auto_20150801_1250.py Source formatted with Black 2019-05-15 14:27:50 +03:00
0010_channel.py Source formatted with Black 2019-05-15 14:27:50 +03:00
0011_notification.py Source formatted with Black 2019-05-15 14:27:50 +03:00
0012_auto_20150930_1922.py Source formatted with Black 2019-05-15 14:27:50 +03:00
0013_auto_20151001_2029.py Source formatted with Black 2019-05-15 14:27:50 +03:00
0014_auto_20151019_2039.py Source formatted with Black 2019-05-15 14:27:50 +03:00
0015_auto_20151022_1008.py Source formatted with Black 2019-05-15 14:27:50 +03:00
0016_auto_20151030_1107.py Source formatted with Black 2019-05-15 14:27:50 +03:00
0017_auto_20151117_1032.py Source formatted with Black 2019-05-15 14:27:50 +03:00
0018_remove_ping_body.py Source formatted with Black 2019-05-15 14:27:50 +03:00
0019_check_tags.py Source formatted with Black 2019-05-15 14:27:50 +03:00
0020_check_n_pings.py Source formatted with Black 2019-05-15 14:27:50 +03:00
0021_ping_n.py Source formatted with Black 2019-05-15 14:27:50 +03:00
0022_auto_20160130_2042.py Source formatted with Black 2019-05-15 14:27:50 +03:00
0023_auto_20160131_1919.py Source formatted with Black 2019-05-15 14:27:50 +03:00
0024_auto_20160203_2227.py Source formatted with Black 2019-05-15 14:27:50 +03:00
0025_auto_20160216_1214.py Source formatted with Black 2019-05-15 14:27:50 +03:00
0026_auto_20160415_1824.py Source formatted with Black 2019-05-15 14:27:50 +03:00
0027_auto_20161213_1059.py Source formatted with Black 2019-05-15 14:27:50 +03:00
0028_auto_20170305_1907.py Source formatted with Black 2019-05-15 14:27:50 +03:00
0029_auto_20170507_1251.py Source formatted with Black 2019-05-15 14:27:50 +03:00
0030_check_last_ping_body.py Source formatted with Black 2019-05-15 14:27:50 +03:00
0031_auto_20170509_1320.py Source formatted with Black 2019-05-15 14:27:50 +03:00
0032_auto_20170608_1158.py Source formatted with Black 2019-05-15 14:27:50 +03:00
0033_auto_20170714_1715.py Source formatted with Black 2019-05-15 14:27:50 +03:00
0034_auto_20171227_1530.py Source formatted with Black 2019-05-15 14:27:50 +03:00
0035_auto_20171229_2008.py Source formatted with Black 2019-05-15 14:27:50 +03:00
0036_auto_20180116_2243.py Source formatted with Black 2019-05-15 14:27:50 +03:00
0037_auto_20180127_1215.py Source formatted with Black 2019-05-15 14:27:50 +03:00
0038_auto_20180318_1306.py Source formatted with Black 2019-05-15 14:27:50 +03:00
0039_remove_check_last_ping_body.py Source formatted with Black 2019-05-15 14:27:50 +03:00
0040_auto_20180517_1336.py Source formatted with Black 2019-05-15 14:27:50 +03:00
0041_check_desc.py Source formatted with Black 2019-05-15 14:27:50 +03:00
0042_auto_20181029_1522.py Source formatted with Black 2019-05-15 14:27:50 +03:00
0043_channel_name.py Source formatted with Black 2019-05-15 14:27:50 +03:00
0044_auto_20181120_2004.py Source formatted with Black 2019-05-15 14:27:50 +03:00
0045_flip.py Source formatted with Black 2019-05-15 14:27:50 +03:00
0046_auto_20181218_1245.py Source formatted with Black 2019-05-15 14:27:50 +03:00
0047_auto_20181225_2315.py Source formatted with Black 2019-05-15 14:27:50 +03:00
0048_auto_20190102_0737.py Source formatted with Black 2019-05-15 14:27:50 +03:00
0049_auto_20190102_0743.py Source formatted with Black 2019-05-15 14:27:50 +03:00
0050_ping_kind.py Source formatted with Black 2019-05-15 14:27:50 +03:00
0051_auto_20190104_0908.py Source formatted with Black 2019-05-15 14:27:50 +03:00
0052_auto_20190104_1122.py Source formatted with Black 2019-05-15 14:27:50 +03:00
0053_check_subject.py Source formatted with Black 2019-05-15 14:27:50 +03:00
0054_auto_20190112_1427.py Source formatted with Black 2019-05-15 14:27:50 +03:00
0055_auto_20190112_1427.py Source formatted with Black 2019-05-15 14:27:50 +03:00
0056_auto_20190114_0857.py Source formatted with Black 2019-05-15 14:27:50 +03:00
0057_auto_20190118_1319.py Source formatted with Black 2019-05-15 14:27:50 +03:00
0058_auto_20190312_1716.py Source formatted with Black 2019-05-15 14:27:50 +03:00
0059_auto_20190314_1744.py Source formatted with Black 2019-05-15 14:27:50 +03:00
0060_tokenbucket.py Source formatted with Black 2019-05-15 14:27:50 +03:00
0061_webhook_values.py A data migration to convert webhook values to the most recent format. 2019-05-30 00:26:30 +03:00
0062_auto_20190720_1350.py Partial indexes for api_check.alert_after and api_flip.processed fields. 2019-07-20 16:58:41 +03:00
0063_auto_20190903_0901.py Add the "Last Duration" field in the "My Checks" page. Add "last_duration" attribute to the Check API resource. Fixes 2019-09-03 13:46:41 +03:00
0064_auto_20191119_1346.py Add Profile.last_active_date field for more accurate inactive user detection 2019-11-19 16:29:38 +02:00
0065_auto_20191127_1240.py "Filtering Rules" dialog, an option to require HTTP POST. Fixes 2019-11-27 16:33:36 +02:00
0066_channel_last_error.py Show a red "!" in project's top navigation if any integration is not working 2020-01-03 13:15:24 +02:00
0067_last_error_values.py Show a red "!" in project's top navigation if any integration is not working 2020-01-03 13:15:24 +02:00
0068_auto_20200117_1023.py Make Ping.body size limit configurable. Fixes 2020-01-17 12:44:39 +02:00
0069_auto_20200117_1227.py Make sure Check.last_ping and Ping.created timestamps match exactly 2020-01-17 14:30:32 +02:00
0070_auto_20200411_1310.py New feature: Project Settings > Transfer Ownership (WIP, missing tests) 2020-04-12 14:46:12 +03:00
0071_check_manual_resume.py Added "When paused, ignore pings" option in the Filtering Rules dialog () 2020-06-02 10:54:16 +03:00
0072_auto_20200701_1007.py Sending a test notification updates Channel.last_error. Fixes 2020-07-01 14:03:11 +03:00
0073_auto_20200721_1000.py Add "Failure Keyword" filtering for inbound emails (cc: ) 2020-07-21 14:57:48 +03:00
0074_auto_20200803_1411.py Use separate counters for SMS and phone calls. 2020-08-03 17:52:09 +03:00
0075_auto_20200805_1004.py Use Django 3.1 2020-08-05 13:11:39 +03:00
0076_auto_20201128_0951.py Add Ping.exitstatus field, store received exit status values in db 2020-11-29 12:12:44 +02:00
0077_auto_20210506_0755.py Increase "Success / Failure Keywords" field lengths to 200 2021-05-06 11:00:36 +03:00
0078_sms_values.py Add support for "... is UP" SMS notifications 2021-05-21 12:57:23 +03:00
0079_auto_20210907_0918.py Implement alternative ping URLs, WIP 2021-09-09 09:32:10 +03:00
0080_fill_slug.py Implement alternative ping URLs, WIP 2021-09-09 09:32:10 +03:00
0081_channel_last_notify.py Add Channel.last_notify and a command to backfill it 2021-10-21 10:56:03 +03:00
0082_fill_last_notify.py Replace backfillchannels with a data migration 2021-10-21 12:35:29 +03:00
0083_channel_disabled.py Refactor transport classes, add Channel.disabled field 2022-01-05 09:46:39 +02:00
0084_ping_body_raw.py Add Ping.body_raw field for storing body as bytes 2022-02-25 16:50:54 +02:00
0085_ping_object_size.py Add support for storing ping bodies in S3-compatible object storage 2022-02-28 11:51:04 +02:00
0086_remove_check_last_ping_was_fail_and_more.py Remove obsolete field: Check.last_ping_was_fail 2022-05-31 15:13:00 +03:00
0087_check_failure_kw_check_filter_body_and_more.py Add "Filter by keywords in the message body" feature 2022-07-12 15:46:15 +03:00
0088_fill_kw.py Add "Filter by keywords in the message body" feature 2022-07-12 15:46:15 +03:00
0089_remove_check_subject_remove_check_subject_fail.py Remove api_check.subject and api_check.subject_fail fields 2022-07-13 11:40:35 +03:00
0090_alter_check_filter_subject.py Add "NOT NULL" constraints on the new api_check fields 2022-07-13 12:02:58 +03:00
0091_alter_check_filter_body.py Add "NOT NULL" constraints on the new api_check fields 2022-07-13 12:02:58 +03:00
0092_alter_check_success_kw.py Fix migrations 2022-07-13 12:24:47 +03:00
0093_alter_check_failure_kw.py Fix migrations 2022-07-13 12:24:47 +03:00
0094_ping_rid_alter_channel_kind.py Added support for a "run id" parameter () 2022-11-08 11:34:26 +02:00
0095_check_last_start_rid.py Improve alerting logic when run IDs are used 2022-11-09 19:01:22 +02:00
__init__.py Renames 2015-06-12 19:33:15 +03:00