Skip to content

Commit 2b48535

Browse files
sujaya-sysguolau
andauthored
added should fail reference for url monitors (#1345)
* added should fail reference for url monitors * Remove extra * on URL monitors page --------- Co-authored-by: Laura Guo <[email protected]>
1 parent eeef4d6 commit 2b48535

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -324,6 +324,8 @@ The `request` object is a mandatory part of an URL monitor.
324324
- `url`: The HTTP(S) URL to monitor.
325325
- `followRedirects`: A boolean indicating automatic following of any `30x` redirects.
326326
- `skipSSL`: A boolean indicating whether to skip validation of SSL certificates.
327+
- `shouldFail`: Treat HTTP error codes (4xx and 5xx) as passed. Please note that successful responses still pass. Only failed assertions will cause the check to fail.
328+
327329
- `assertions`: You can define assertions via the `UrlAssertionBuilder`. For URL monitors, only status code assertions are supported. For example:
328330

329331
### `UrlAssertionBuilder`

site/content/docs/url-monitors/_index.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,9 @@ Each URL monitor is defined by its request configuration, which includes the tar
2828
* **Request method:** Always `GET`.
2929
* **URL:** The HTTP(S) URL to monitor (e.g. `https://api.example.com`).
3030
* **IP family:** Defaults to IPv4.
31+
* **Follow redirects:** Automatically follow 30x redirects.
32+
* **Skip SSL:** Skip SSL certificate validation.
33+
* **This request should fail:** Treat HTTP error codes (4xx and 5xx) as passed. Please note that successful responses still pass. Only failed assertions will cause the check to fail.
3134

3235
To validate the response further, you can configure:
3336

@@ -87,4 +90,4 @@ new UrlMonitor('hello-url-1', {
8790
{{< /tab >}}
8891
{{< /tabs >}}
8992

90-
See the full [Url monitor construct reference](/docs/cli/constructs-reference/#urlmonitor) for more context.
93+
See the full [Url monitor construct reference](/docs/cli/constructs-reference/#urlmonitor) for more context.

0 commit comments

Comments
 (0)