287 Commits

Author SHA1 Message Date
Pēteris Caune
61a8a8de26
Remove Profile.reports_allowed (obsolete)
It is obsoleted by Profile.reports
2021-06-29 14:38:06 +03:00
swoga
b70e2c9a25 feat: treat failure before success 2021-06-29 14:05:56 +03:00
Pēteris Caune
a0cd2c63e9
Update report templates for weekly reports 2021-05-26 09:48:23 +03:00
Pēteris Caune
8ce09ab9e5
Widen report time window to 9AM - 11AM 2021-05-24 15:17:27 +03:00
Pēteris Caune
6094bca241
Improve wording 2021-05-24 14:13:43 +03:00
Pēteris Caune
df44ee58c0
Add an option for weekly reports (in addition to monthly) 2021-05-24 13:44:34 +03:00
Pēteris Caune
e91441d814
Add fallback for legacy sms values 2021-05-21 13:05:37 +03:00
Pēteris Caune
855d188981
Add support for "... is UP" SMS notifications
Fixes: #512
2021-05-21 12:57:23 +03:00
Pēteris Caune
4587b45cab
Add more tests for hc.api.views.create_check 2021-04-14 12:21:58 +03:00
Pēteris Caune
2831e5d7c1
Add a test case for filtering flips by timestamp 2021-04-14 12:00:32 +03:00
Pēteris Caune
05db43f95d
Fix the pause action to clear Profile.next_nag_date if all checks up 2021-03-15 12:52:35 +02:00
Pēteris Caune
7ba5fcbb71
Fix sendalerts to clear Profile.next_nag_date if all checks up
Profile.next_nag_date tracks when the next hourly/daily reminder
should be sent. Normally, sendalerts sets this field when
a check goes down, and sendreports clears it out whenever
it is about to send a reminder but realizes all checks are up.

The problem: sendalerts can set next_nag_date to a non-null
value, but it does not clear it out when all checks are up.
This can result in a hourly/daily reminder being sent out
at the wrong time. Specific example, assuming hourly reminders:

13:00: Check A goes down. next_nag_date gets set to 14:00.
13:05: Check A goes up. next_nag_date remains set to 14:00.
13:55: Check B goes down. next_nag_date remains set to 14:00.
14:00: Healthchecks sends a hourly reminder, just 5 minutes
       after Check B going down. It should have sent the reminder
       at 13:55 + 1 hour = 14:55

The fix: sendalerts can now both set and clear the next_nag_date
field. The main changes are in Project.update_next_nag_dates()
and in Profile.update_next_nag_date(). With the fix:

13:00: Check A goes down. next_nag_date gets set to 14:00.
13:05: Check A goes up. next_nag_date gets set to null.
13:55: Check B goes down. next_nag_date gets set to 14:55.
14:55: Healthchecks sends a hourly reminder.
2021-03-15 12:34:39 +02:00
Pēteris Caune
2bfea987e9
Replace details_url with cloaked_url in email and chat notifications 2021-03-04 16:55:05 +02:00
Pēteris Caune
5321f772fe
Add a link to check's details page in Slack notifications
Fixes: #486
2021-03-04 15:51:35 +02:00
Pēteris Caune
44a677f327
Fix hc.api.views.notification_status to always return 200
If the notification does not exist, or is more than a hour
old, return HTTP 200 (instead of 400 or 404) so the other
party doesn't retry over and over again.
2021-02-09 14:25:26 +02:00
Pēteris Caune
c1f433bb71
Rename VictorOps -> Splunk On-Call 2021-02-03 16:09:24 +02:00
Pēteris Caune
5979204691
Fix downtime summary to handle months when the check didn't exist
Fixes: #472
2021-02-03 14:27:06 +02:00
Pēteris Caune
65ace8238a
Add the ZULIP_ENABLED setting 2021-02-03 09:11:32 +02:00
Pēteris Caune
e2c90c05b8
Add the VICTOROPS_ENABLED setting 2021-02-03 09:00:28 +02:00
Pēteris Caune
205f1ccce6
Upgrade croniter to 1.0.6 2021-02-02 08:50:25 +02:00
Pēteris Caune
8811640d45
Add the SPIKE_ENABLED setting 2021-01-29 15:21:38 +02:00
Pēteris Caune
419d96da7a
Add the PAGERTREE_ENABLED setting 2021-01-29 14:21:02 +02:00
Pēteris Caune
28150e85fa
Add the PD_ENABLED setting 2021-01-29 14:06:40 +02:00
Pēteris Caune
8d5890d883
Add the OPSGENIE_ENABLED setting, rename OpsGenie -> Opsgenie 2021-01-29 13:47:13 +02:00
Pēteris Caune
5f31b8b873
Add the MSTEAMS_ENABLED setting 2021-01-29 13:20:44 +02:00
Pēteris Caune
6c3debaf11
Add the MATTERMOST_ENABLED setting 2021-01-29 12:36:47 +02:00
Pēteris Caune
52435a9a0c
Add the SLACK_ENABLED setting 2021-01-29 11:59:33 +02:00
Pēteris Caune
67ff8a9bee
Add the WEBHOOKS_ENABLED setting 2021-01-29 11:16:11 +02:00
Pēteris Caune
c2bb4b31b5
Add rate limiting for Pushover notifications 2021-01-28 14:07:39 +02:00
Pēteris Caune
fbefcbc0ed
Update apprise tests to skip if apprise is not installed 2021-01-19 13:57:55 +02:00
Pēteris Caune
d45dc2f6a3
Change Zulip onboarding, ask for the zuliprc file
Fixes: #202
2021-01-19 11:04:38 +02:00
Pēteris Caune
9a0888aacd
Update sendalerts to log per-notification send times
To send notifications, sendalerts calls Flip.send_alerts().
I updated Flip.send_alerts() to be a generator, and to yield
a (channel, error, send_time_in_seconds) triple per sent
notification.
2021-01-15 15:15:00 +02:00
Pēteris Caune
3b6afae140
Specify timeout in the DBus calls 2021-01-14 09:59:06 +02:00
Pēteris Caune
d7c7ae6531
Fix tests 2021-01-13 12:13:14 +02:00
Pēteris Caune
74ed15e0aa
Update the signal integration to use DBus
The initial implementation was just calling signal-cli directly
using `subprocess.run`.

Going with DBus makes it easier to shield signal-cli from the
rest of the system. It also makes sure the signal-cli daemon is
running in the background and receiving messages. This is important
when a recipient does the "Reset secure connection" from the app. We
must receive their new keys, otherwise our future messages will
appear as "bad encrypted message" for them.
2021-01-13 11:52:42 +02:00
Pēteris Caune
a80b831eea
Add rate-limiting for Signal messages 2021-01-11 15:07:34 +02:00
Pēteris Caune
0aeef7d06e
Fix unwanted HTML escaping in SMS and WhatsApp notifications 2021-01-10 18:29:38 +02:00
Pēteris Caune
cd99af14ba
Add Signal integration
Fixes: #428
2021-01-09 11:58:18 +02:00
Pēteris Caune
8fe8e0f605
Update alert email template: more information, less styling
Fixes: #348
2020-12-26 18:11:36 +02:00
Pēteris Caune
617bd92434
Add Ping.exitstatus field, store received exit status values in db
Fixes #455
2020-11-29 12:12:44 +02:00
Pēteris Caune
524d1a7375
Implement badge mode (up/down vs up/late/down) selector
Fixes #282
2020-11-27 12:57:25 +02:00
Pēteris Caune
155a1f132b
Simplify super() calls in tests 2020-11-16 11:20:01 +02:00
Pēteris Caune
0b685e8b5a
Disable retries when testing webhook integration
Normally, when a webhook call fails (timeout, connection
error, non-2xx response), the HTTP request is retried up to two
times (so up to 3 times total). This is useful when sending
actual notifications, in case the webhook target has a temporary
glitch.

When interactively testing a webhook integration
("Send Test Notification" in the
"Integrations" page), we would prefer to see any errors ASAP
on the screen instead of retrying and so possibly swallowing them.

One specific use case is webhook targets that take long time to
generate a response. "Send Test Notification" is synchronous,
meaning that the user could be stuck for
5 x 3 = 15 seconds waiting for the  test HTTP request to time out
three times.
2020-10-30 12:36:17 +02:00
Pēteris Caune
81e59ac553
Add support for script's exit status in ping URLs
Fixes: #429
2020-10-28 14:28:32 +02:00
Pēteris Caune
6f56ed7f92
Reduce the number of SQL queries used in the "Get Checks" API call 2020-10-27 16:19:57 +02:00
Pēteris Caune
7534f1856f
Add testcases for setting channels in the "Create Check" API call 2020-10-14 18:12:35 +03:00
Pēteris Caune
0e77064c44
Update API to allow specifying channels by names
Fixes: #440
2020-10-14 15:37:04 +03:00
Pēteris Caune
463ec8c988
Set the "title" and "summary" fields in MS Teams notifications
Fixes: #435
2020-10-06 16:43:56 +03:00
Pēteris Caune
05c81e0a41
Escape markdown in MS Teams notifications. cc: #426 2020-09-11 11:49:46 +03:00
Pēteris Caune
b64c8d1cb8
API support for setting the allowed HTTP methods for making ping requests 2020-09-10 10:29:44 +03:00