0
0
Fork 0
mirror of https://github.com/healthchecks/healthchecks.git synced 2025-04-07 14:15:34 +00:00
Commit graph

122 commits

Author SHA1 Message Date
Pēteris Caune
1503ca479b
Reformat 2025-03-10 10:24:13 +02:00
Pēteris Caune
bf97e3967c
Make Check.badge_key non-nullable
cc: 
2024-12-27 12:47:24 +02:00
Pēteris Caune
8922c81314
Add data migration to fill badge_key for all checks
cc: 
2024-12-27 12:18:06 +02:00
Pēteris Caune
8dab5d8c36
Add default value (uuid.uuidv4()) for Check.badge_key
cc: 
2024-12-27 11:36:48 +02:00
Pēteris Caune
5e848f4976
Add index on api_flip (owner_id, created)
This helps queries in hc.front.views._get_events,
especially for checks that are flipping between up and down
states a lot.
2024-12-03 10:37:01 +02:00
Pēteris Caune
9edae634c7
Add Flip.reason field
cc: 
2024-11-08 10:24:50 +02:00
Pēteris Caune
79da9e9f4f
Fix auto-fixable ruff warnings
(`ruff check --fix`)
2024-11-07 15:15:58 +02:00
Pēteris Caune
c372e3232f
Update MS Teams legacy webhook retirement date to Jan 2025
Microsoft pushed it forward again:
https://devblogs.microsoft.com/microsoft365dev/retirement-of-office-365-connectors-within-microsoft-teams/
2024-10-25 09:51:58 +03:00
Pēteris Caune
8eecece0bb
Add db migration for the updated msteams name 2024-09-10 14:45:48 +03:00
Pēteris Caune
70b55a777b
Add migration which updates Channel.kind values
This is to go with 8054191be3,
and should have been in there :-)

cc: 
2024-08-17 12:12:47 +03:00
Pēteris Caune
8054191be3
Remove HipChat, Pagerteam, Zendesk channel kinds
HipChat and Pagerteam products have long been shut down,
the Zendesk integration was never fully implemented.
2024-07-18 16:21:45 +03:00
Pēteris Caune
3e5080d9eb
Remove Ping.body field 2024-07-11 16:34:18 +03:00
Pēteris Caune
daaee30c88
Add data migration to move Check.body -> Check.body_raw
We used "body" to store request body as text.
In 2022 we added "body_raw" and started to use it to store request
body as bytes.

In python code we currently need to inspect both fields,
because the data could be in "body" (for old pings) or in
"body_raw" (for newer pings). My plan is to eventually get rid
of the "body" field, and have "body_raw" only. This data migration
is a step towards that: for any Ping objects that have non-empty
"body" field, it moves the data to the "body_raw" field. After
applying this migration, the "body" field should be empty (empty
string or null) for all Ping objects.
2024-07-11 14:38:36 +03:00
Pēteris Caune
b5eced26cf
Fix migrations for Django 5.1 2024-06-27 10:20:27 +03:00
Pēteris Caune
b2c5e91c70
Implement legacy -> canonical timezone conversion
There are three related changes:

* Removed legacy timezones from hc.lib.tz.all_timezones
* Added data migration to update existing Check.tz values
* For backwards compatibility, added code to automatically
  replace a legacy timezone with a canonical timezone when a
  legacy timezone is passed to an API call

I used the timezone mapping on
https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
2024-06-14 12:55:57 +03:00
Pēteris Caune
c5bd666faf
Add data migration to update timezone "Europe/Kiev" to "Europe/Kyiv" 2024-06-13 15:03:51 +03:00
Pēteris Caune
26a57343b1
Add a data migration to fill null api_notification.code values
Using model's default didn't quite work, as Django tried to use
the same UUID for all rows.
2024-05-17 10:43:46 +03:00
Pēteris Caune
d486d2db14
Add uniqueness constraint to api_notification.code
This is primarily to make notification lookups by code efficient.
We look up notifications by code in hc.api.views.boundces.

This field has a default value (uuid.uuid4), so any null values
will be filled with random UUIDs during migration.
2024-05-17 10:30:01 +03:00
Pēteris Caune
1322bb1123
Add support for per-check status badges
Fixes: 
2024-02-27 12:55:51 +02:00
Michael Boateng
6bfd9c901c
Make grace time editable when job is created ()
Fixes: 
2024-02-08 15:34:52 +02:00
Pēteris Caune
fa25453734
Add migration for the Group integration 2023-11-22 10:16:27 +02:00
Pēteris Caune
343e55bd4f
Improve type hints 2023-10-25 18:12:12 +03:00
Pēteris Caune
aa541e760b
Add Channel.opsgenie property
It replaces:

* Channel.opsgenie_key
* Channel.opsgenie_region

Also, add data migration to normalize Opsgenie channel values
to always be JSON maps.
2023-09-11 16:44:38 +03:00
Pēteris Caune
4147bd951d
Make Channel.disabled non-nullable 2023-08-29 16:29:29 +03:00
Pēteris Caune
58cc623377
Format migration files with black 2023-07-12 10:11:07 +03:00
Pēteris Caune
368e76016d
Add Channel.last_notify_duration, use in sendalerts for prioritization 2023-07-07 16:40:23 +03:00
Pēteris Caune
34530e0e91
Add Profile.over_limit_date DB field 2023-06-16 16:28:03 +03:00
Pēteris Caune
1fd343a820
Remove usages of django.utils.timezone.utc which is deprecated 2023-05-04 10:56:19 +03:00
Pēteris Caune
a9b084ec9a
Add "Start Keyword" filtering for inbound emails
Fixes: 
2023-01-16 13:19:35 +02:00
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
seidnerj
b6027fa126
Added support for a "run id" parameter ()
Add support for specifying a run ID via a "rid" query parameter

cc: 
2022-11-08 11:34:26 +02:00
seidnerj
c82c1a3a4a
Added duration to ping details ()
* Added duration to ping details. This is useful on a device with a small screen, since the duration cannot be seen in the main view so now one can see it in the ping's details.
* Changed terms across the board from "delta" to "duration"
* timedelta is now consistently imported as "td" across the entire project (even in Django generated migration files)
2022-11-01 09:18:34 +02:00
Pēteris Caune
4766aade95
Fix migrations
When adding "NOT NULL" on multiple columns at once, Django
throws errors:

    django.db.utils.OperationalError:
    cannot ALTER TABLE "api_check" because it has
    pending trigger events

A workaround is to modify columns one by one in
separate migrations.
2022-07-13 12:24:47 +03:00
Pēteris Caune
ae4ee37053
Add "NOT NULL" constraints on the new api_check fields
cc: 
2022-07-13 12:02:58 +03:00
Pēteris Caune
cc32af6127
Remove api_check.subject and api_check.subject_fail fields
cc: 
2022-07-13 11:40:35 +03:00
Pēteris Caune
003d35d431
Add "Filter by keywords in the message body" feature
cc: 
2022-07-12 15:46:15 +03:00
Pēteris Caune
03dea07ae2
Remove obsolete field: Check.last_ping_was_fail 2022-05-31 15:13:00 +03:00
Pēteris Caune
05bb80130b
Add support for storing ping bodies in S3-compatible object storage
This is an initial, minimal implementation. It is currently
missing: error handling, timeouts for S3 operations, documentation.

cc: 
2022-02-28 11:51:04 +02:00
Pēteris Caune
5ecd625c0b
Add Ping.body_raw field for storing body as bytes 2022-02-25 16:50:54 +02:00
Pēteris Caune
7317adc7f7
Refactor transport classes, add Channel.disabled field
- Refactor transport classes to raise exceptions
  on delivery problems, instead of returning error
  message as string. Exceptions can carry extra meta
  information (see TransportError.permanent field, see
  MigrationRequiredError subclass). I considered attaching
  the extra information to strings by subclassing str, but
  using exceptions felt cleaner and less hacky.

- Add Channel.disabled field, for disabling integrations
  on permanent errors. For example, if Slack returns
  HTTP 404, we will now mark the integration as disabled
  and will not make requests to that Slack endpoint again.
2022-01-05 09:46:39 +02:00
Pēteris Caune
6bb0c77934
Replace backfillchannels with a data migration 2021-10-21 12:35:29 +03:00
Pēteris Caune
33fb4a36ca
Add Channel.last_notify and a command to backfill it 2021-10-21 10:56:03 +03:00
Pēteris Caune
5b9008e321
Implement alternative ping URLs, WIP 2021-09-09 09:32:10 +03:00
Pēteris Caune
855d188981
Add support for "... is UP" SMS notifications
Fixes: 
2021-05-21 12:57:23 +03:00
Pēteris Caune
64f2e86051
Increase "Success / Failure Keywords" field lengths to 200 2021-05-06 11:00:36 +03:00
Pēteris Caune
617bd92434
Add Ping.exitstatus field, store received exit status values in db
Fixes 
2020-11-29 12:12:44 +02:00
Pēteris Caune
750b96c374
Use Django 3.1 2020-08-05 13:11:39 +03:00
Pēteris Caune
8c13457037
Use separate counters for SMS and phone calls. 2020-08-03 17:52:09 +03:00
Pēteris Caune
0d03e3f00b
Add "Failure Keyword" filtering for inbound emails (cc: ) 2020-07-21 14:57:48 +03:00
Pēteris Caune
3a00c0d2aa
Sending a test notification updates Channel.last_error. Fixes 2020-07-01 14:03:11 +03:00