Skip to content

Commit 8902c94

Browse files
sujaya-syspmallolMariadeAnton
authored
Checkly Groups Makeover - First Draft of dev docs rewrite (#1264)
* first draft * Changed formatting * Minor wording changes * Wording improvements * Adjusted wording to be in line with microcopy of app * fix: add dash to 'round-parallel' * docs: add group behavior for overridable settings in cli * feat: add AlertSettings section with configuration details and example usage * Added CheckGroupsV2 reference * Refined wording * Refined wording * Update site/content/docs/cli/constructs-reference.md Co-authored-by: María de Antón <[email protected]> * Update site/content/docs/cli/constructs-reference.md Co-authored-by: María de Antón <[email protected]> * Update site/content/docs/cli/constructs-reference.md Co-authored-by: María de Antón <[email protected]> * Update site/content/docs/groups/_index.md Co-authored-by: María de Antón <[email protected]> * Update site/content/docs/cli/constructs-reference.md Co-authored-by: María de Antón <[email protected]> * Updated link and CLI version * Adjusted warning syntax --------- Co-authored-by: Paula Mallol <[email protected]> Co-authored-by: María de Antón <[email protected]>
1 parent 8a59631 commit 8902c94

File tree

2 files changed

+101
-53
lines changed

2 files changed

+101
-53
lines changed

site/content/docs/cli/constructs-reference.md

Lines changed: 72 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -382,35 +382,34 @@ TcpAssertionBuilder.responseData().contains('ping')
382382
"{ source: 'RESPONSE_DATA', regex: '', property: '', comparison: 'CONTAINS', target: 'ping' }"
383383
```
384384

385-
## `CheckGroup`
385+
## `CheckGroupV2`
386386

387-
You can explicitly organize Checks in Check Groups.
388-
389-
This brings the following benefits:
387+
Use the CheckGroupV2 construct to organize your Checks into groups. This comes with the following benefits:
390388

391389
1. Your Checks are organized in a folder in the Checkly web UI.
392390
2. You can trigger all Checks in a group from the web UI and via a command line trigger.
393391
3. You can manage group-level configuration like the runtime, activated & muted-state, tags and alert channels that trickle down to all the Checks in the group.
394392

395393
> [!WARNING]
396-
> Adding a check to a group means having it _only_ alert through the group's alert channels. Make sure your group has connected alert channels, or you might miss out on important alerts!
394+
> If you add a check to a group with group-level alert settings ON, the check will only send alerts through the groups alert channels. Make sure the group has at least one alert channel connected, otherwise you won’t receive any alerts for that check.
397395
398396
> Note: you will notice that managing shared configuration between Checks is very easy just using JS/TS. You might not need Check Groups for that purpose.
399397
400398
#### Adding Checks to a Check Group
401399

402400
You can add a Check to a group in two ways.
403401

404-
1. By passing the `CheckGroup` object for the `group` property of a Check.
402+
1. By passing the `CheckGroupV2` object for the `group` property of a Check.
405403
2. For Browser Checks, we allow you to use the `testMatch` glob pattern to include any `.spec.js|ts` file, without having to
406404
create a `BrowserCheck` construct. This works the same ast the `testMatch` glob at the Project level.
407405

408406
```ts {title="group.check.ts"}
409-
import { CheckGroup, ApiCheck, Frequency } from 'checkly/constructs'
407+
import { CheckGroupV2, ApiCheck, Frequency } from 'checkly/constructs'
410408

411-
const group = new CheckGroup('check-group-1', {
409+
const group = new CheckGroupV2('check-group-1', {
412410
name: 'Group',
413411
activated: true,
412+
muted: false,
414413
frequency: Frequency.EVERY_15M,
415414
locations: ['us-east-1', 'eu-west-1'],
416415
tags: ['api-group'],
@@ -431,33 +430,83 @@ new ApiCheck('check-group-api-check-1', {
431430
})
432431
```
433432

434-
- `name`: A friendly name for your Check Group.
433+
- `name` (required): A friendly name for your Check Group.
434+
- `activated`: Boolean that determines whether the Checks in the group are running or not. When set to true (default), all activated Checks within the group will run. When set to false, no Checks in the group will run, regardless of whether they are activated or not.
435+
- `muted`: Boolean that controls alerting behavior for the group. When set to false (default), alerting follows the individual Check’s muted setting. When set to true, no alerts will be sent for any Checks in the group — even if the individual Checks are not muted.
435436
- `concurrency`: A number indicating the amount of concurrent Checks to run when a group is triggered.
436437
- `frequency`: How often to run the Checks within the group, i.e. `Frequency.EVERY_15M` for every fifteen minutes.
437-
- `locations`: An array of location codes where to run the Checks in the group, i.e. `['us-east-1', 'eu-west-1']`.
438-
- `privateLocations`: An array of [Private Locations](/docs/private-locations/) slugs, i.e. `['datacenter-east-1']`.
439-
- `alertChannels`: An array of `AlertChannel` objects to which to send alert notifications.
440-
- `activated`: A boolean value if all the Checks in the group are activated.
441-
- `muted`: A boolean value if alert notifications from the Checks in the group are muted, i.e. not sent out.
442-
- `tags`: An array of tags. Group tags trickle down to tags on the individual Checks. i.e. `['product', 'api']`
443-
- `runtimeId`: The ID of which [runtime](/docs/runtimes/specs/) to use for the Checks in the group.
444-
- `environmentVariables`: An array of objects defining variables in the group scope, i.e. `[{ key: 'DEBUG', value: 'true', secret: true | locked: true }]`
438+
- `locations`: An array of one or more [public locations](/docs/monitoring/global-locations) where Checks in this group should run (e.g. `['us-east-1', 'eu-west-1']`). If this or `privateLocations` is set, it overrides the location settings of all Checks in the group.
439+
- `privateLocations`: An array of one or more [private locations](/docs/private-locations) where Checks in this group should run (e.g. `['datacenter-east-1']`). If this or `locations` is set, it overrides the location settings of all Checks in the group.
440+
- `alertChannels`: An array of [AlertChannel](#alertchannel) objects to be alerted on when checks in this group fail or recover.
441+
- `tags`: An array of tags i.e. `['product', 'api']`. Group tags trickle down to tags on the individual Checks.
442+
- `runtimeId`: The ID of which [runtime](/docs/runtimes/specs/) to use for the Checks in the group. Use this if the checks in this group require a different runtime than your account default.
443+
- `environmentVariables`: An array of objects defining [environment variables in the group scope](/docs/groups/variables), i.e. `[{ key: 'DEBUG', value: 'true', secret: true | locked: true }]`.
445444
- `localSetupScript`: Any JS/TS code as a string to run before each API Check in this group.
446445
- `localTearDownScript`: Any JS/TS code as a string to run after each API Check in this group.
447-
- `retryStrategy`: A [RetryStrategy](#retrystrategy) object configuring [retries](/docs/alerting-and-retries/) for failed check runs.
448-
- `apiCheckDefaults`: A set of defaults for API Checks. This should not be needed. Just compose shared defaults using JS/TS.
446+
- `retryStrategy`: A [RetryStrategy](#retrystrategy) object configuring [retries](/docs/alerting-and-retries/) for failed Check runs. If set, all checks in the group use the group's retry strategy. If not set, individual Check settings are used.
447+
- `apiCheckDefaults`: A set of [defaults for API Checks](/docs/groups/api-check-defaults/). This should not be needed. Just compose shared defaults using JS/TS.
449448
- `browserChecks`: A set of defaults for Browser Checks. This should not be needed. Just compose shared defaults using JS/TS.
450-
- `runParallel`: A boolean value if check should run in parallel (all locations at the same time) or round-robin.
451-
- `alertEscalationPolicy`: An [AlertEscalationPolicy](#alertescalationpolicy) object configuring [alert-settings](/docs/alerting-and-retries/) for check runs.
449+
- `runParallel`: Controls how Checks in the group are executed across locations. When `true`, all Checks run in parallel across all configured locations. When `false`, they run in round-robin mode. If **not set**, each Check uses its own scheduling strategy.
450+
- `alertEscalationPolicy`: An [AlertEscalationPolicy](#alertescalationpolicy) object defines [alert-settings](/docs/alerting-and-retries/) for Check runs. If **set**, it overrides the alert settings of all checks in the group. If **not set**, each Check uses its own alert configuration.
452451

453-
> When adding checks to a group using `testMatch`, the CLI searches for files using the corresponding [check file](/docs/cli/using-check-test-match/#checkscheckmatch) as a base path.
452+
> When you use `testMatch` to add Checks to a group, the CLI searches for matching files using the corresponding [Check file](/docs/cli/using-check-test-match/#checkscheckmatch) as a base path.
454453
455454
> Note that you can configure two different `frequency` properties for API and Browser checks in a `CheckGroup` separately.
456455
> The CLI follows a fallback logic using `Check->CheckGroup->Project` configurations.
457456
457+
## `CheckGroup` (deprecated)
458+
459+
As of CLI release v6.0 the CheckGroup construct is deprecated and will be removed in a future version. We recommend migrating to [CheckGroupV2](#checkgroupv2), which offers more intuitive behavior and better control.
460+
461+
In the deprecated `CheckGroup`, the properties `runParallel`, `locations`, `privateLocations`, `alertEscalationPolicy`, and `retryStrategy` were always treated as overrides. Even when not explicitly set, default values were applied and used to override the Check’s individual settings. With `CheckGroupV2`, no value means no override. If these fields are left undefined, Checks will use their own individual configuration.
462+
463+
Please double-check your group definitions when migrating to make sure your Check behavior stays consistent. For a full overview of what’s changing and what to watch out for, check out our [migration guide](https://feedback.checklyhq.com/changelog/checkly-groups-update-organize-checks-your-way).
464+
465+
## `AlertSettings`
466+
467+
[Alert settings](/docs/alerting-and-retries/alert-settings/#alert-settings) let you to control when and how often you will be notified when a Check starts failing, degrades or recovers.
468+
469+
Here’s what the configuration object looks like:
470+
471+
- `reminders`: Defines how many reminder notifications to send (amount) and the time interval between them in minutes (interval) while an alert is active.
472+
- `escalationType`: Specifies the escalation strategy. Possible values include `RUN_BASED` (escalate after a number of failed runs) or `TIME_BASED` (escalate after a time threshold).
473+
- `runBasedEscalation`: Configures run-based escalation. `failedRunThreshold` defines how many failed runs trigger escalation.
474+
- `timeBasedEscalation`: Configures time-based escalation. `minutesFailingThreshold` defines how long a Check must be failing before escalation.
475+
- `parallelRunFailureThreshold`: Optional. Enables escalation based on the percentage of parallel runs that fail. Use `enabled` to toggle this, and `percentage` to define the failure threshold.
476+
477+
```ts {title="api.check.ts"}
478+
import { ApiCheck, RetryStrategyBuilder } from 'checkly/constructs'
479+
480+
new ApiCheck('retrying-check', {
481+
name: 'Check With Retries',
482+
request: {
483+
method: 'GET',
484+
url: 'https://danube-web.shop/api/books'
485+
}
486+
alertSettings: {
487+
reminders: {
488+
amount: 0,
489+
interval: 5
490+
},
491+
escalationType: "RUN_BASED",
492+
runBasedEscalation: {
493+
failedRunThreshold: 1
494+
},
495+
timeBasedEscalation: {
496+
minutesFailingThreshold: 5
497+
},
498+
parallelRunFailureThreshold: {
499+
enabled: false,
500+
percentage: 10
501+
}
502+
}
503+
})
504+
```
505+
458506
## `AlertChannel`
459507

460-
Alert channels let you get alert notifications when a Check fails. [Learn more about alerting in our docs](/docs/alerting/)
508+
Alert channels let you get alert notifications when a Check fails. [Learn more about alerting in our docs](/docs/alerting/).
509+
461510
All alert channels share a set of common properties to define when / how they should alert derived from the abstract class
462511
`AlertChannel`
463512

site/content/docs/groups/_index.md

Lines changed: 29 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -13,57 +13,47 @@ aliases:
1313

1414
---
1515

16-
Groups allow you to organize your checks and centralize settings like base URLs, headers, variables and other properties
17-
a collection of checks can share.
16+
Groups help you organize your checks (e.g. by team or feature) and apply shared configuration such as API defaults, scheduling & location overrides, and other properties.
1817

1918
![Check group screenshot](/docs/images/groups/group-in-dashboard.png)
2019

21-
Example use cases for groups are organizing your checks around:
20+
# Creating a check group
2221

23-
- A common URL endpoint
24-
- A specific team
25-
- A specific feature in your app
26-
- A test suite; trigger all checks after a deployment
22+
By default, newly created check groups behave like folders, with no [group-level configuration](#group-level-configuration) applied. To get started:
2723

28-
> Group-level configurations, such as the runtime, activated & muted state, tags, and alert channels, will override check-level configurations.
24+
* **Define a name:** Pick a meaningful name for your group. It helps you and your team identify the group in Checkly and in alerts triggered by failures.
2925

30-
> [!WARNING]
31-
> Alert settings being controlled at group level means that a check that is part of a group that has no connected alert channels *will not alert*.
32-
33-
## Creating a check group
34-
35-
![Check group editor screenshot](/docs/images/groups/group-editor.png)
26+
* **Add tags (optional)**: Tags help you relate groups to one another and also determine which checks appear on your [dashboards](/docs/dashboards/).
3627

37-
### Name and tags
38-
Pick a meaningful name for your group. A meaningful name will not only help you and others identify your group within Checkly, but it will help provide a better alerting experience if checks in this group fall into an alert state. Tags can relate your groups together, they also determine which checks are shown on your [dashboards](/docs/dashboards/).
28+
You can populate a group by moving existing checks into it or by creating new checks directly within the group.
3929

40-
### Checks
41-
Add new or existing checks to this group. If you add an existing check, the group configuration will overwrite certain check configurations, like run locations, retries, and alerting.
30+
# Group level configuration
4231

43-
For example, if you create a check that runs in `eu-west-1` but then add it to a group running in `us-east-1`, then the check will run from `us-east-1` only.
32+
Groups let you apply shared configuration to standardize how checks behave. Below is a breakdown of each setting and how it affects checks in the group:
4433

4534
### API checks defaults
46-
You can set [API check defaults](/docs/groups/api-check-defaults/), including a common base URL, request information, [assertions](/docs/api-checks/assertions/), and [setup & teardown scripts](/docs/api-checks/setup-teardown-scripts/), to help manage API checks.
35+
You can define [API check defaults](/docs/groups/api-check-defaults/) such as a common base URL, request information, [assertions](/docs/api-checks/assertions/), and [setup & teardown scripts](/docs/api-checks/setup-teardown-scripts/) to manage API checks in your group at scale.
4736

4837
### Variables
49-
For configuration information commonly used by checks in this group, create [group environment variables and secrets](/docs/groups/variables/). When checks are scheduled, these will be merged with environment variables at the check and global levels.
38+
For configuration information commonly used by checks in your group, create [group environment variables and secrets](/docs/groups/variables/). These are merged with variables at the global and check levels when a check runs.
5039

51-
### Scheduling & locations
52-
Pick from our list of [public](/docs/monitoring/global-locations/) locations or from your [private](/docs/private-locations/) ones. This will override the scheduling strategy (i.e. parallel or round-robin) and location settings for checks in this group.
40+
### Scheduling & locations overrides
5341

54-
Checks still run on their own scheduling intervals, but you can specify a default at the group level with the `frequency` property via the [CLI](/docs/cli/constructs-reference/#checkgroup).
42+
* **Locations:** Select [public](/docs/monitoring/global-locations/) or [private](/docs/private-locations/) locations. This will override the location setting for all checks in your group. For example, if you create a check that runs in `eu-west-1` but add it to a group running in `us-east-1`, the check will run from `us-east-1` only.
5543

56-
### Retries & alerting
44+
* **Scheduling strategy:** Selecting a [scheduling strategy](/docs/monitoring/global-locations/#scheduling-strategies) will override this setting for all checks in your group. For example, if you create a check that runs in `parallel` but add it to a group running in `round-robin`, the check will run in `round-robin` only.
5745

58-
Select your preferred [retry strategy](/docs/alerting-and-retries/retries/) for failed checks. This will override retry settings for checks in this group.
46+
* **Frequency:** Each check in your group runs at its own scheduling interval. However, you can specify a default at the group level with the `frequency` property via the [CLI](/docs/cli/constructs-reference/#checkgroup).
5947

60-
You can configure [alert channels](/docs/alerting-and-retries/alert-channels) for checks in this group. If we don’t provide your preferred alert method, use [webhooks](/docs/alerting-and-retries/webhooks/) to configure your alert flow. Like with retries, this will override alert settings for checks in this group.
48+
### Retries & alerting overrides
49+
50+
* **Retries:** Select your preferred [retry strategy](/docs/alerting-and-retries/retries/) for failed checks. This will override retry settings for all checks in your group. For example, if you create a check that runs with `fixed` retries but add it to a group running with `linear` retries, the check will run with `linear` retries only.
51+
52+
* **Alert settings:** You can configure [alert channels](/docs/alerting-and-retries/alert-channels) for checks in your group. If we don’t provide your preferred alert method, use [webhooks](/docs/alerting-and-retries/webhooks/) to configure your alert flow. Like with retries, this will override alert settings for checks in your group.
6153

6254
> [!WARNING]
6355
> Make sure to select an alert channel, otherwise checks in this group *will not alert*.
6456
65-
> Note that some alerting channels, like [SMS](/docs/alerting-and-retries/sms-delivery/) and [Phone call](/docs/alerting-and-retries/phone-calls/) are only available on our [Team and Enterprise plans](https://www.checklyhq.com/pricing/#feature-overview)
66-
6757
### Testing
6858

6959
You can run checks in this group as [E2E tests](/docs/testing) locally or from your CI/CD pipeline to validate your freshly deployed application. Use the Checkly CLI, or configure integrations with Vercel and GitHub.
@@ -72,7 +62,16 @@ You can run checks in this group as [E2E tests](/docs/testing) locally or from y
7262

7363
Checkly manages the [runtime](/docs/runtimes) environment for your JavaScript code in browser checks and setup & teardown scripts. If the checks in this group need a runtime different from your account default, you can set that here.
7464

75-
## How we run grouped checks
65+
# Adding or removing checks from groups
66+
67+
* **Moving a check into a group:** If the group has [group-level configuration](#group-level-configuration) defined, adding a check may change how it runs. Settings like API defaults, locations & scheduling, or retries & alerting can override or append to the check’s configuration.
68+
69+
* **Removing check from group:** Any [group-level configuration](#group-level-configuration) will no longer apply, and the check will use its own configuration going forward.
70+
71+
> [!WARNING]
72+
> To prevent issues (e.g. broken references to group variables), the check will be automatically deactivated after being added to or removed from a group. Make sure to review its settings before reactivating.
73+
74+
# How we run grouped checks
7675

7776
It helps to understand how we run the checks in a group, specifically if you're doing more sophisticated checks with shared
7877
variables, script and alerting channels. Here are the rules:

0 commit comments

Comments
 (0)