Skip to content

Commit

Permalink
Merge branch 'main' into josep-fl-patch-1
Browse files Browse the repository at this point in the history
  • Loading branch information
tnolet authored Nov 9, 2023
2 parents b63282a + 6178681 commit f3a8384
Show file tree
Hide file tree
Showing 27 changed files with 609 additions and 89 deletions.
4 changes: 2 additions & 2 deletions __checks__/alertChannels.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@ import { OpsgenieAlertChannel, SlackAlertChannel } from 'checkly/constructs'
import { alertChannelIds } from './defaults'

export const slackChannelOps = SlackAlertChannel.fromId(alertChannelIds.slack)
export const opsGenieChannelP1 = OpsgenieAlertChannel.fromId(alertChannelIds.opsGenieP1)
// removed temporarily for testing snapshots / visual comparisons
export const opsGenieChannelP3 = OpsgenieAlertChannel.fromId(alertChannelIds.opsGenieP3)
export const alertChannels = [slackChannelOps, opsGenieChannelP3]
export const alertChannels = [slackChannelOps]
8 changes: 8 additions & 0 deletions __checks__/docs-visual.spec.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import { test } from '@playwright/test'
import { ChecklySitePage } from './poms/ChecklySitePage'

test('homepage visual comparison', async ({ page }) => {
const checklyPage = new ChecklySitePage(page)
await checklyPage.goto('/docs')
await checklyPage.doScreenshotCompare()
})
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
17 changes: 14 additions & 3 deletions __checks__/poms/ChecklySitePage.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
import type { BrowserContext, Page } from '@playwright/test'
import type { Page } from '@playwright/test'
import { expect } from '@playwright/test'
import { defaults } from '../defaults'

export class ChecklySitePage {
public page: Page

constructor (page) {
constructor (page: Page) {
this.page = page
}

Expand All @@ -17,7 +18,17 @@ export class ChecklySitePage {
await this.page.goto(defaults.baseURL + uri)
}

async screenshot (name) {
async screenshot (name: string) {
await this.page.screenshot({ path: `${defaults.screenshotPath}/${name}.jpg` })
}

async doScreenshotCompare () {
await expect(this.page).toHaveScreenshot({
maxDiffPixelRatio: 0.2,
mask: [
this.page.locator('.optanon-alert-box-wrapper'),
this.page.locator('#intercom-container-body')
]
})
}
}
3 changes: 2 additions & 1 deletion __checks__/site.check-group.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
import { CheckGroup, RetryStrategyBuilder } from 'checkly/constructs'
import { CheckGroup, RetryStrategyBuilder, Frequency } from 'checkly/constructs'
import { alertChannels } from './alertChannels'

export const checklyhqComGroup = new CheckGroup('checklyhq-docs-1', {
name: 'checklyhq.com/docs',
activated: true,
muted: false,
runtimeId: '2023.02',
frequency: Frequency.EVERY_1H,
locations: [
'us-east-1',
'us-west-1',
Expand Down
102 changes: 48 additions & 54 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
},
"devDependencies": {
"@playwright/test": "1.31.2",
"checkly": "4.1.0",
"checkly": "4.4.0-prerelease",
"eslint": "7.32.0",
"eslint-config-standard": "16.0.3",
"eslint-plugin-html": "7.1.0",
Expand Down
9 changes: 7 additions & 2 deletions site/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -66,13 +66,18 @@ disqusShortname = "checkly"
url = "/docs/heartbeat-checks/"
weight = 35

[[menu.resources]]
name = "Multistep API checks"
url = "/docs/multistep-checks/"
weight = 40

[[menu.resources]]
name = "Groups"
url = "/docs/groups/"
weight = 40
weight = 45

[[menu.resources]]
name = "Retries & Alerting"
name = "Alerting & retries"
url = "/docs/alerting/"
weight = 50

Expand Down
18 changes: 18 additions & 0 deletions site/content/docs/alerting-and-retries/_index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
---
title: 'Overview'
weight: 29
slug: /
menu:
resources:
parent: "Alerting & retries"
cli: true
aliases:
- /docs/alerting/
---

Checkly will alert you when your checks [change state](/docs/alerting-and-retries/alert-states), e.g. when a passing check starts failing. To make the most out of Checkly alerts, you will want to configure them so they fit your workflow.

You can break Checkly alerting down to three main areas:
1. [Alert settings](/docs/alerting-and-retries/alert-settings), controlling **when** and **how often** you want to be alerted when a check fails/degrades/recovers.
2. [Alert channels](/docs/alerting-and-retries/alert-channels), determining **how** alert notifications will be sent to you.
3. [Retries](/docs/alerting-and-retries/retries), which will help you avoid false positives by re-running failed checks.
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,12 @@ title: Alert channels
weight: 31
menu:
resources:
parent: "Retries & Alerting"
parent: "Alerting & retries"
cli: true
---

Alert channels are the channels through which alert notifications will reach you when a check starts failing, showing degraded performance or recover.

You can add as many of the following alert channels as you want:

- Email
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ title: Alert notification log
weight: 36
menu:
resources:
parent: "Retries & Alerting"
parent: "Alerting & retries"
---

Checkly tries to deliver all your failure, degradation and recovery notifications as reliably as possible, but sometimes
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,15 @@ title: 'Alert settings'
weight: 30
menu:
resources:
parent: "Retries & Alerting"
parent: "Alerting & retries"
lastmod: 01-06-2020
aliases:
- /alerting/settings/
- /alerting/
cli: true
---

Alerting in Checkly is pretty flexible and should address most common needs. You can tweak exactly when and how you should
be alerted, on what channels like email, [SMS]({{< ref "sms-delivery.md" >}}), [Slack]({{< ref "../integrations/slack.md" >}}) etc.
If you need more, you can integrate with [Pagerduty]({{< ref "../integrations/pagerduty.md" >}}),
[Opsgenie]({{< ref "../integrations/opsgenie.md" >}}) and many more! See [our integrations page]({{< ref "../integrations/" >}})
for all options.
Alert settings allow you to control when and how often you will be notified when a check starts failing, degrades or recovers.

## Alert settings

Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
---
title: Alert states
weight: 32
weight: 34
menu:
resources:
parent: "Retries & Alerting"
parent: "Alerting & retries"
---

Sending out alert notifications like emails and Slack hooks depends on four factors:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
---
title: Phone Calls
weight: 34
weight: 35
menu:
resources:
parent: "Retries & Alerting"
parent: "Alerting & retries"
---

The phone numbers used for phone call alerting need to be in [E.164 format](https://www.twilio.com/docs/glossary/what-e164). Stick to the following rules, and you'll be fine:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
---
title: 'Retries'
weight: 29
slug: /
weight: 32
menu:
resources:
parent: "Retries & Alerting"
parent: "Alerting & retries"
cli: true
aliases:
- /docs/alerting/
---

Sometimes the internet is flaky, or your app is just having a hiccup not worth pinging your on-call team about. Retries
Expand Down
Loading

0 comments on commit f3a8384

Please sign in to comment.