Skip to content

Commit

Permalink
U-4230 Make request_timeout for monitors docs more consistent and eas…
Browse files Browse the repository at this point in the history
…ier to parse (#133)
  • Loading branch information
PetrHeinz authored Jan 16, 2025
1 parent 88f5d9d commit 66a4ed3
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 14 deletions.
8 changes: 3 additions & 5 deletions docs/data-sources/betteruptime_monitor.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,11 +88,9 @@ Monitor lookup.
- **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?

- 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
- For Server and Port monitors (types `ping`, `tcp`, `udp`, `smtp`, `pop`, `imap` and `dns`) the timeout is specified in *milliseconds*. Valid options: 500, 1000, 2000, 3000, 5000.
- For Playwright monitors (type `playwright`), this determines the Playwright scenario timeout instead in *seconds*. Valid options: 15, 30, 45, 60.
- For all other monitors, the timeout is specified in *seconds*. Valid options: 2, 3, 5, 10, 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
8 changes: 3 additions & 5 deletions docs/resources/betteruptime_monitor.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,11 +84,9 @@ https://betterstack.com/docs/uptime/api/monitors/
- **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?

- 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
- For Server and Port monitors (types `ping`, `tcp`, `udp`, `smtp`, `pop`, `imap` and `dns`) the timeout is specified in *milliseconds*. Valid options: 500, 1000, 2000, 3000, 5000.
- For Playwright monitors (type `playwright`), this determines the Playwright scenario timeout instead in *seconds*. Valid options: 15, 30, 45, 60.
- For all other monitors, the timeout is specified in *seconds*. Valid options: 2, 3, 5, 10, 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
8 changes: 4 additions & 4 deletions internal/provider/resource_monitor.go
Original file line number Diff line number Diff line change
Expand Up @@ -239,10 +239,10 @@ var monitorSchema = map[string]*schema.Schema{
// TODO: ValidateDiagFunc: validation.StringInSlice
},
"request_timeout": {
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",
Description: "How long to wait before timing out the request?\n" +
" - For Server and Port monitors (types `ping`, `tcp`, `udp`, `smtp`, `pop`, `imap` and `dns`) the timeout is specified in *milliseconds*. Valid options: 500, 1000, 2000, 3000, 5000.\n" +
" - For Playwright monitors (type `playwright`), this determines the Playwright scenario timeout instead in *seconds*. Valid options: 15, 30, 45, 60.\n" +
" - For all other monitors, the timeout is specified in *seconds*. Valid options: 2, 3, 5, 10, 15, 30, 45, 60.\n",
Type: schema.TypeInt,
Optional: true,
Computed: true,
Expand Down

0 comments on commit 66a4ed3

Please sign in to comment.