You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: packages/cli/src/rules/checkly.rules.template.md
+27-21Lines changed: 27 additions & 21 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,9 +2,9 @@
2
2
3
3
- Refer to docs for Checkly CLI v6.0.0 and above.
4
4
- Check the Checkly CLI output to figure out into which folder the setup was generated.
5
-
- Use the [Checkly CLI reference documentation](https://www.checklyhq.com/docs/cli/command-line-reference).
6
-
- Use the [Checkly construct reference documentation](https://www.checklyhq.com/docs/cli/constructs-reference).
7
-
- Import and / or require any constructs you need in your code, such as `ApiCheck`, `BrowserCheck` from the `checkly/constructs` package.
5
+
- Use the [Checkly CLI reference documentation](https://www.checklyhq.com/docs/cli/overview/).
6
+
- Use the [Checkly construct reference documentation](https://www.checklyhq.com/docs/constructs/overview/).
7
+
- Import and / or require any constructs you need in your code, such as `ApiCheck`, `BrowserCheck`, or `PlaywrightCheck` from the `checkly/constructs` package.
8
8
- Always ground generated code and CLI commands against the official documentation and examples in this file.
9
9
10
10
## Installing the Checkly CLI
@@ -38,8 +38,8 @@ The `checkly.config.ts` at the root of your project defines a range of defaults
38
38
### API Check
39
39
40
40
- Import the `ApiCheck` construct from `checkly/constructs`.
41
-
- Reference [the docs for API checks](https://www.checklyhq.com/docs/cli/constructs-reference/#apicheck) before generating any code.
42
-
- When adding `assertions`, always use `AssertionBuilder` class for API Checks which are [documented here](https://www.checklyhq.com/docs/cli/constructs-reference/#assertionbuilder).
41
+
- Reference [the docs for API checks](https://www.checklyhq.com/docs/constructs/api-check/) before generating any code.
42
+
- When adding `assertions`, always use `AssertionBuilder` class for API Checks.
43
43
- When referencing environment variables always use the handlebar syntax `{{MY_ENV_VAR}}`.
44
44
- When referencing secrets always use the handlebar syntax `{{MY_SECRET}}`.
45
45
- If endpoints require authentication ask the user which authentication method to use and then generate a setupScript to authenticate the given requests.
@@ -60,7 +60,7 @@ The `checkly.config.ts` at the root of your project defines a range of defaults
60
60
### Browser Check
61
61
62
62
- Import the `BrowserCheck` construct from `checkly/constructs`.
63
-
- Reference [the docs for Browser checks](https://www.checklyhq.com/docs/cli/constructs-reference/#browsercheck) before generating any code.
63
+
- Reference [the docs for Browser checks](https://www.checklyhq.com/docs/constructs/browser-check/) before generating any code.
64
64
- Generate a separate `.spec.ts` file for the Playwright code referenced in the `BrowserCheck` construct.
65
65
- Use the `code.entrypoint` property to specify the path to your Playwright test file.
66
66
@@ -71,7 +71,7 @@ The `checkly.config.ts` at the root of your project defines a range of defaults
71
71
### MultiStep Check
72
72
73
73
- Import the `MultiStepCheck` construct from `checkly/constructs`.
74
-
- Reference [the docs for Multistep checks](https://www.checklyhq.com/docs/cli/constructs-reference/#multistepcheck) before generating any code.
74
+
- Reference [the docs for Multistep checks](https://www.checklyhq.com/docs/constructs/multistep-check/) before generating any code.
75
75
- Generate a separate `.spec.ts` file for the Playwright code referenced in the `MultiStepCheck` construct.
76
76
- Use the `code.entrypoint` property to specify the path to your Playwright test file.
77
77
@@ -82,8 +82,8 @@ The `checkly.config.ts` at the root of your project defines a range of defaults
82
82
### TCP Monitor
83
83
84
84
- Import the `TcpMonitor` construct from `checkly/constructs`.
85
-
- Reference [the docs for TCP monitors](https://www.checklyhq.com/docs/cli/constructs-reference/#tcpmonitor) before generating any code.
86
-
- When adding `assertions`, always use `TcpAssertionBuilder` class for TCP monitors which is [documented here](https://www.checklyhq.com/docs/cli/constructs-reference/#tcpassertionbuilder)
85
+
- Reference [the docs for TCP monitors](https://www.checklyhq.com/docs/constructs/tcp-monitor/) before generating any code.
86
+
- When adding `assertions`, always use `TcpAssertionBuilder` class for TCP monitors.
87
87
88
88
```typescript
89
89
// INSERT TCP MONITOR EXAMPLE HERE //
@@ -92,8 +92,8 @@ The `checkly.config.ts` at the root of your project defines a range of defaults
92
92
### URL Monitor
93
93
94
94
- Import the `UrlMonitor` construct from `checkly/constructs`.
95
-
- Reference [the docs for URL monitors](https://www.checklyhq.com/docs/cli/constructs-reference/#urlmonitor) before generating any code.
96
-
- When adding `assertions`, always use `UrlAssertionBuilder` class which is [documented here](https://www.checklyhq.com/docs/cli/constructs-reference/#urlassertionbuilder)
95
+
- Reference [the docs for URL monitors](https://www.checklyhq.com/docs/constructs/url-monitor/) before generating any code.
96
+
- When adding `assertions`, always use `UrlAssertionBuilder`.
97
97
98
98
```typescript
99
99
// INSERT URL MONITOR EXAMPLE HERE //
@@ -102,8 +102,8 @@ The `checkly.config.ts` at the root of your project defines a range of defaults
102
102
### DNS Monitor
103
103
104
104
- Import the `DnsMonitor` construct from `checkly/constructs`.
105
-
- Reference [the docs for DNS monitors](https://www.checklyhq.com/docs/cli/constructs-reference/#dnsmonitor) before generating any code.
106
-
- When adding `assertions`, always use `DnsAssertionBuilder` class which is [documented here](https://www.checklyhq.com/docs/cli/constructs-reference/#dnsassertionbuilder)
105
+
- Reference [the docs for DNS monitors](https://www.checklyhq.com/docs/constructs/dns-monitor/) before generating any code.
106
+
- When adding `assertions`, always use `DnsAssertionBuilder` class.
107
107
108
108
```typescript
109
109
// INSERT DNS MONITOR EXAMPLE HERE //
@@ -112,7 +112,7 @@ The `checkly.config.ts` at the root of your project defines a range of defaults
112
112
### Heartbeat Monitor
113
113
114
114
- Import the `HeartbeatMonitor` construct from `checkly/constructs`.
115
-
- Reference [the docs for Heartbeat monitor](https://www.checklyhq.com/docs/cli/constructs-reference/#heartbeatmonitor) before generating any code.
115
+
- Reference [the docs for Heartbeat monitor](https://www.checklyhq.com/docs/constructs/heartbeat-monitor/) before generating any code.
116
116
117
117
```typescript
118
118
// INSERT HEARTBEAT MONITOR EXAMPLE HERE //
@@ -121,7 +121,7 @@ The `checkly.config.ts` at the root of your project defines a range of defaults
121
121
### Check Group
122
122
123
123
- Import the `CheckGroupV2` construct from `checkly/constructs`.
124
-
- Reference [the docs for Check Groups](https://www.checklyhq.com/docs/cli/constructs-reference/#checkgroupv2) before generating any code.
124
+
- Reference [the docs for Check Groups](https://www.checklyhq.com/docs/constructs/check-group-v2/) before generating any code.
125
125
- Check Groups are used to group checks together for easier management and organization.
126
126
- Checks are added to Check Groups by referencing the group in the `group` property of a check.
127
127
@@ -134,24 +134,30 @@ The `checkly.config.ts` at the root of your project defines a range of defaults
134
134
- Alert channels are used to send notifications when checks and monitors fail or recover.
135
135
- Alert channels are added to checks, monitors, and check groups constructs by adding them to the `alertChannels` array property.
136
136
137
-
Here are some examples of how to create different types of alert channels. All alert are described in the [Checkly docs](https://www.checklyhq.com/docs/cli/constructs-reference/#alertchannel).
137
+
Here are some examples of how to create different types of alert channels. All alert are described in the [Checkly docs](https://www.checklyhq.com/docs/constructs/overview/).
138
138
139
139
### Email Alert Channel
140
140
141
+
- Reference [the docs for Email Alert Channels](https://www.checklyhq.com/docs/constructs/email-alert-channel/) before generating any code.
142
+
141
143
```typescript
142
144
// INSERT EMAIL ALERT CHANNEL EXAMPLE HERE //
143
145
```
144
146
145
147
146
148
### Phone Call Alert Channel
147
149
150
+
- Reference [the docs for Phone Call Alert Channels](https://www.checklyhq.com/docs/constructs/phone-call-alert-channel/) before generating any code.
151
+
148
152
```typescript
149
153
// INSERT PHONE CALL ALERT CHANNEL EXAMPLE HERE //
150
154
```
151
155
152
156
153
157
### Slack Alert Channel
154
158
159
+
- Reference [the docs for Slack Alert Channels](https://www.checklyhq.com/docs/constructs/slack-alert-channel/) before generating any code.
160
+
155
161
```typescript
156
162
// INSERT SLACK ALERT CHANNEL EXAMPLE HERE //
157
163
```
@@ -162,7 +168,7 @@ Here are some examples of how to create different types of alert channels. All a
162
168
### Status Page
163
169
164
170
- Import the `StatusPage` construct from `checkly/constructs`.
165
-
- Reference [the docs for StatusPages](https://www.checklyhq.com/docs/cli/constructs-reference/#statuspage) before generating any code.
171
+
- Reference [the docs for StatusPages](https://www.checklyhq.com/docs/constructs/status-page/) before generating any code.
166
172
- Status pages are used to display the status of your services to your users.
167
173
- A Status Page consists of cards which include Status Page Services.
168
174
@@ -173,7 +179,7 @@ Here are some examples of how to create different types of alert channels. All a
173
179
### Status Page Service
174
180
175
181
- Import the `StatusPageService` construct from `checkly/constructs`.
176
-
- Reference [the docs for Status Page Services](https://www.checklyhq.com/docs/cli/constructs-reference/#statuspageservice) before generating any code.
182
+
- Reference [the docs for Status Page Services](https://www.checklyhq.com/docs/constructs/status-page-service/) before generating any code.
177
183
- Status Page Services are used to represent individual services on a Status Page.
178
184
179
185
```typescript
@@ -183,7 +189,7 @@ Here are some examples of how to create different types of alert channels. All a
183
189
### Dashboard
184
190
185
191
- Import the `Dashboard` construct from `checkly/constructs`.
186
-
- Reference [the docs for Dashboards](https://www.checklyhq.com/docs/cli/constructs-reference/#dashboard) before generating any code.
192
+
- Reference [the docs for Dashboards](https://www.checklyhq.com/docs/constructs/dashboard/) before generating any code.
187
193
- Dashboards are used to display the results of your checks on screens external to Checkly.
188
194
189
195
```typescript
@@ -193,7 +199,7 @@ Here are some examples of how to create different types of alert channels. All a
193
199
### Maintenance Window
194
200
195
201
- Import the `MaintenanceWindow` construct from `checkly/constructs`.
196
-
- Reference [the docs for Maintenance Windows](https://www.checklyhq.com/docs/cli/constructs-reference/#maintenancewindow) before generating any code.
202
+
- Reference [the docs for Maintenance Windows](https://www.checklyhq.com/docs/constructs/maintenance-window/) before generating any code.
197
203
- Maintenance windows are used to pause checks during maintenance periods so no alerts are sent.
198
204
- Checks are referenced by their tags in the `tags` property.
199
205
@@ -204,7 +210,7 @@ Here are some examples of how to create different types of alert channels. All a
204
210
### Private Location
205
211
206
212
- Import the `PrivateLocation` construct from `checkly/constructs`.
207
-
- Reference [the docs for Private Locations](https://www.checklyhq.com/docs/cli/constructs-reference/#privatelocation) before generating any code.
213
+
- Reference [the docs for Private Locations](https://www.checklyhq.com/docs/constructs/private-location/) before generating any code.
208
214
- Private locations are used to run checks from your own infrastructure with the Checkly Agent, an OCI compatible container.
0 commit comments