Skip to content

Commit

Permalink
[U-3962] Fix request_timeout for monitors documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
iatanas0v committed Jan 9, 2025
1 parent e536454 commit 79a0be7
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 6 deletions.
7 changes: 6 additions & 1 deletion docs/data-sources/betteruptime_monitor.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,12 @@ Monitor lookup.
- **remember_cookies** (Boolean) Set to true to keep cookies when redirecting.
- **request_body** (String) Request body for POST, PUT, PATCH requests. Required if monitor_type is set to dns (domain to query the DNS server with).
- **request_headers** (List of Map of String) An array of request headers, consisting of name and value pairs
- **request_timeout** (Number) How long to wait before timing out the request? In seconds. When `monitor_type` is set to `playwright`, this determines the Playwright scenario timeout.
- **request_timeout** (Number) How long to wait before timing out the request?

- For Server and Port monitors (`ping`, `tcp`, `udp`, `smtp`, `pop`, `imap` and `dns`) timeout is specified in *milliseconds*. Valid options: 500, 1000, 2000, 3000, 5000.
- For all other monitor types timeout is specified in *seconds*. Valid options: 2, 3, 5, 10, 15, 30, 45, 60.

When monitor_type is set to playwright, this determines the Playwright scenario timeout instead. In *seconds*. Valid options: 15, 30, 45, 60
- **required_keyword** (String) Required if monitor_type is set to keyword or udp. We will create a new incident if this keyword is missing on your page.
- **scenario_name** (String) For Playwright monitors, the scenario name identifying the monitor in the UI.
- **sms** (Boolean) Should we send an SMS to the on-call person?
Expand Down
7 changes: 6 additions & 1 deletion docs/resources/betteruptime_monitor.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,12 @@ https://betterstack.com/docs/uptime/api/monitors/
- **remember_cookies** (Boolean) Set to true to keep cookies when redirecting.
- **request_body** (String) Request body for POST, PUT, PATCH requests. Required if monitor_type is set to dns (domain to query the DNS server with).
- **request_headers** (List of Map of String) An array of request headers, consisting of name and value pairs
- **request_timeout** (Number) How long to wait before timing out the request? In seconds. When `monitor_type` is set to `playwright`, this determines the Playwright scenario timeout.
- **request_timeout** (Number) How long to wait before timing out the request?

- For Server and Port monitors (`ping`, `tcp`, `udp`, `smtp`, `pop`, `imap` and `dns`) timeout is specified in *milliseconds*. Valid options: 500, 1000, 2000, 3000, 5000.
- For all other monitor types timeout is specified in *seconds*. Valid options: 2, 3, 5, 10, 15, 30, 45, 60.

When monitor_type is set to playwright, this determines the Playwright scenario timeout instead. In *seconds*. Valid options: 15, 30, 45, 60
- **required_keyword** (String) Required if monitor_type is set to keyword or udp. We will create a new incident if this keyword is missing on your page.
- **scenario_name** (String) For Playwright monitors, the scenario name identifying the monitor in the UI.
- **sms** (Boolean) Should we send an SMS to the on-call person?
Expand Down
11 changes: 7 additions & 4 deletions internal/provider/resource_monitor.go
Original file line number Diff line number Diff line change
Expand Up @@ -239,10 +239,13 @@ var monitorSchema = map[string]*schema.Schema{
// TODO: ValidateDiagFunc: validation.StringInSlice
},
"request_timeout": {
Description: "How long to wait before timing out the request? In seconds. When `monitor_type` is set to `playwright`, this determines the Playwright scenario timeout.",
Type: schema.TypeInt,
Optional: true,
Computed: true,
Description: "How long to wait before timing out the request?\n\n" +
" - For Server and Port monitors (`ping`, `tcp`, `udp`, `smtp`, `pop`, `imap` and `dns`) timeout is specified in *milliseconds*. Valid options: 500, 1000, 2000, 3000, 5000.\n" +
" - For all other monitor types timeout is specified in *seconds*. Valid options: 2, 3, 5, 10, 15, 30, 45, 60.\n\n" +
" When monitor_type is set to playwright, this determines the Playwright scenario timeout instead. In *seconds*. Valid options: 15, 30, 45, 60",
Type: schema.TypeInt,
Optional: true,
Computed: true,
},
"request_body": {
Description: "Request body for POST, PUT, PATCH requests. Required if monitor_type is set to dns (domain to query the DNS server with).",
Expand Down

0 comments on commit 79a0be7

Please sign in to comment.