511 Commits

Author SHA1 Message Date
Pēteris Caune
d243f502d3
Fix off-by-one-month error in monthly reports, downtime columns
Fixes: #539
2021-07-02 15:22:51 +03:00
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
fd7ab5e767
Implement PagerDuty Simple Install Flow 2021-06-16 14:18:32 +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
64f2e86051
Increase "Success / Failure Keywords" field lengths to 200 2021-05-06 11:00:36 +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
742af7bfd8
Remove unused return statement 2021-04-14 11:54:43 +03:00
Pēteris Caune
78652b5659
Upgrade Django version to 3.2 2021-04-07 11:39:11 +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
474d782869
Rename VictorOps -> Splunk On-Call 2021-02-03 16:23:15 +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
67560c96e1
Change icon CSS class prefix to work around Fanboy's filter list
Problem: if you use uBlock Origin, and enable the
"Fanboy's Social" filter list, Healthchecks does not show
Telegram or WhatsApp icons. This is because the filter list
contains "##.icon-telegram" and "##.icon-whatsapp" entries.

This commit changes the CSS class prefix to "ic-". So we're
now using icon classes like "ic-telegram" and "ic-whatsapp".

As a bonus, we save 2 bytes in HTML per displayed icon :-)
2021-02-03 10:44:35 +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
d4aac691ce
Increase the timeout for sending Signal messages 2021-01-11 12:56:53 +02:00
Pēteris Caune
ee37d305ef
Tighten Telegram rate limit to 6 messages / minute
With the previous 10 minutes / minute limit we were still hitting
Telegram API rate limit (the 429, "Too Many Requests" response)
from time to time.

Therefore, tighten the limit a bit on our side.
2021-01-11 10:54:46 +02:00
Pēteris Caune
f607ee67d5
Allow searching in the error field in Notifications admin 2021-01-11 10:08:36 +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