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: CHANGELOG.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,7 @@
1
1
## 2.19.2 (Unreleased)
2
2
ENHANCEMENTS:
3
3
* Suppress diffs for equivalent values of some time attributes. This should reduce output of `terraform plan` that didn't disappear after running `terraform apply`. (GH-442)
4
+
* Add better validation and documentation for some time attributes (GH-443)
ValidateFunc: validation.StringMatch(regexp.MustCompile(`-?(\d)+[smhd]`), "Time range must be in the format '-?\\d+[smhd]'. Examples: -15m, 1d, etc."),
110
+
ValidateFunc: validation.StringMatch(regexp.MustCompile(`^-?(\d)+[smhd]$`), "Time range must be in the format '-?\\d+[smhd]'. Examples: -15m, 1d, etc."),
@@ -551,14 +551,14 @@ var consecutiveSchema = schema.Schema{
551
551
vartimeRangeSchema= schema.Schema{
552
552
Type: schema.TypeString,
553
553
Required: true,
554
-
ValidateFunc: validation.StringMatch(regexp.MustCompile(`-?(\d)+[smhd]`), "Time range must be in the format '-?\\d+[smhd]'. Examples: -15m, 1d, etc."),
554
+
ValidateFunc: validation.StringMatch(regexp.MustCompile(`^-?(\d)+[smhd]$`), "Time range must be in the format '-?\\d+[smhd]'. Examples: -15m, 1d, etc."),
ValidateFunc: validation.StringMatch(regexp.MustCompile(`-?(\d)+[smhd]`), "Time range must be in the format '-?\\d+[smhd]'. Examples: -15m, 1d, etc."),
561
+
ValidateFunc: validation.StringMatch(regexp.MustCompile(`^-?(\d)+[smhd]$`), "Time range must be in the format '-?\\d+[smhd]'. Examples: -15m, 1d, etc."),
Copy file name to clipboardExpand all lines: website/docs/r/monitor.html.markdown
+16-11Lines changed: 16 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -315,6 +315,12 @@ The following arguments are supported:
315
315
-`Logs`: A logs query monitor.
316
316
-`Metrics`: A metrics query monitor.
317
317
-`Slo`: A SLO based monitor (beta).
318
+
-`evaluation_delay` - (Optional) Evaluation delay as a string consists of the following elements:
319
+
1. `<number>`: number of time units,
320
+
2. `<time_unit>`: time unit; possible values are: `h` (hour), `m` (minute), `s` (second).
321
+
322
+
Multiple pairs of `<number><time_unit>` may be provided. For example,
323
+
`2m50s` means 2 minutes and 50 seconds.
318
324
-`slo_id` - (Optional) Identifier of the SLO definition for the monitor. This is only applicable & required for Slo `monitor_type`.
319
325
-`queries` - (Required) All queries from the monitor.
320
326
-`trigger_conditions` - (Required if not using `triggers`) Defines the conditions of when to send notifications. NOTE: `trigger_conditions` supplants the `triggers` argument.
@@ -400,26 +406,26 @@ Here is a summary of arguments for each condition type (fields which are not mar
400
406
#### logs_static_condition
401
407
-`field`
402
408
-`critical`
403
-
-`time_range` (Required)
409
+
-`time_range` (Required) : Accepted format: Optional `-` sign followed by `<number>` followed by a `<time_unit>` character: `s` for seconds, `m` for minutes, `h` for hours, `d` for days. Examples: `30m`, `-12h`.
404
410
-`alert` (Required)
405
411
-`threshold`
406
412
-`threshold_type`
407
413
-`resolution` (Required)
408
414
-`threshold`
409
415
-`threshold_type`
410
-
-`resolution_window`
416
+
-`resolution_window` Accepted format: `<number>` followed by a `<time_unit>` character: `s` for seconds, `m` for minutes, `h` for hours, `d` for days. Examples: `0s, 30m`.
411
417
-`warning`
412
-
-`time_range` (Required)
418
+
-`time_range` (Required) : Accepted format: Optional `-` sign followed by `<number>` followed by a `<time_unit>` character: `s` for seconds, `m` for minutes, `h` for hours, `d` for days. Examples: `30m`, `-12h`.
413
419
-`alert` (Required)
414
420
-`threshold`
415
421
-`threshold_type`
416
422
-`resolution` (Required)
417
423
-`threshold`
418
424
-`threshold_type`
419
-
-`resolution_window`
425
+
-`resolution_window` Accepted format: `<number>` followed by a `<time_unit>` character: `s` for seconds, `m` for minutes, `h` for hours, `d` for days. Examples: `0s, 30m`.
420
426
#### metrics_static_condition
421
427
-`critical`
422
-
-`time_range` (Required)
428
+
-`time_range` (Required) : Accepted format: Optional `-` sign followed by `<number>` followed by a `<time_unit>` character: `s` for seconds, `m` for minutes, `h` for hours, `d` for days. Examples: `30m`, `-12h`.
423
429
-`occurrence_type` (Required)
424
430
-`alert` (Required)
425
431
-`threshold`
@@ -428,7 +434,7 @@ Here is a summary of arguments for each condition type (fields which are not mar
428
434
-`threshold`
429
435
-`threshold_type`
430
436
-`warning`
431
-
-`time_range` (Required)
437
+
-`time_range` (Required) : Accepted format: Optional `-` sign followed by `<number>` followed by a `<time_unit>` character: `s` for seconds, `m` for minutes, `h` for hours, `d` for days. Examples: `30m`, `-12h`.
432
438
-`occurrence_type` (Required)
433
439
-`alert` (Required)
434
440
-`threshold`
@@ -456,10 +462,9 @@ Here is a summary of arguments for each condition type (fields which are not mar
456
462
-`baseline_window`
457
463
-`threshold`
458
464
#### logs_missing_data_condition
459
-
-`time_range` (Required)
465
+
-`time_range` (Required) : Accepted format: Optional `-` sign followed by `<number>` followed by a `<time_unit>` character: `s` for seconds, `m` for minutes, `h` for hours, `d` for days. Examples: `30m`, `-12h`.
460
466
#### metrics_missing_data_condition
461
-
-`time_range` (Required)
462
-
-`trigger_source` (Required)
467
+
-`time_range` (Required) : Accepted format: Optional `-` sign followed by `<number>` followed by a `<time_unit>` character: `s` for seconds, `m` for minutes, `h` for hours, `d` for days. Examples: `30m`, `-12h`.
@@ -468,10 +473,10 @@ Here is a summary of arguments for each condition type (fields which are not mar
468
473
469
474
#### slo_burn_rate_condition
470
475
-`critical`
471
-
-`time_range` (Required) : The relative time range for the burn rate percentage evaluation.
476
+
-`time_range` (Required) : The relative time range for the burn rate percentage evaluation. Accepted format: Optional `-` sign followed by `<number>` followed by a `<time_unit>` character: `s` for seconds, `m` for minutes, `h` for hours, `d` for days. Examples: `30m`, `-12h`.
472
477
-`burn_rate_threshold` (Required) : The burn rate percentage threshold.
473
478
-`warning`
474
-
-`time_range` (Required)
479
+
-`time_range` (Required) : Accepted format: Optional `-` sign followed by `<number>` followed by a `<time_unit>` character: `s` for seconds, `m` for minutes, `h` for hours, `d` for days. Examples: `30m`, `-12h`.
0 commit comments