Skip to content

Commit 33ace7f

Browse files
author
Ashish Gaurav
committed
[Monitors] add docs for slo type
Took 2 minutes
1 parent 08389b7 commit 33ace7f

File tree

1 file changed

+82
-0
lines changed

1 file changed

+82
-0
lines changed

website/docs/r/monitor.html.markdown

Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,73 @@ resource "sumologic_monitor" "tf_metrics_monitor_1" {
108108
}
109109
```
110110

111+
112+
## Example SLO Monitors
113+
114+
```hcl
115+
resource "sumologic_monitor" "tf_slo_monitor_1" {
116+
name = "SLO SLI monitor"
117+
type = "MonitorsLibraryMonitor"
118+
is_disabled = false
119+
content_type = "Monitor"
120+
monitor_type = "Slo"
121+
slo_id = "0000000000000009"
122+
evaluation_delay = "5m"
123+
124+
trigger_conditions {
125+
slo_sli_condition {
126+
critical {
127+
sli_threshold = 99.5
128+
}
129+
warning {
130+
sli_threshold = 99.9
131+
}
132+
}
133+
}
134+
135+
notifications {
136+
notification {
137+
connection_type = "Email"
138+
recipients = ["[email protected]"]
139+
subject = "Monitor Alert: {{TriggerType}} on {{Name}}"
140+
time_zone = "PST"
141+
message_body = "Triggered {{TriggerType}} Alert on {{Name}}: {{QueryURL}}"
142+
}
143+
run_for_trigger_types = ["Critical", "ResolvedCritical"]
144+
}
145+
playbook = "test playbook"
146+
}
147+
148+
resource "sumologic_monitor" "tf_slo_monitor_2" {
149+
name = "SLO Burn rate monitor"
150+
type = "MonitorsLibraryMonitor"
151+
is_disabled = false
152+
content_type = "Monitor"
153+
monitor_type = "Slo"
154+
slo_id = "0000000000000009"
155+
evaluation_delay = "5m"
156+
queries {
157+
row_id = "A"
158+
query = "_sourceCategory=event-action info"
159+
}
160+
trigger_conditions {
161+
slo_burn_rate_condition {
162+
critical {
163+
burn_rate_threshold = 10
164+
time_range = "1d"
165+
}
166+
warning {
167+
burn_rate_threshold = 5
168+
time_range = "1d"
169+
}
170+
}
171+
}
172+
173+
#...
174+
}
175+
176+
```
177+
111178
## Example Logs Monitor with Webhook Connection and Folder
112179

113180
```hcl
@@ -210,6 +277,8 @@ The following arguments are supported:
210277
- `monitor_type` - (Required) The type of monitor. Valid values:
211278
- `Logs`: A logs query monitor.
212279
- `Metrics`: A metrics query monitor.
280+
- `Slo`: A SLO based monitor (beta).
281+
- `slo_id` - (Optional) Identifier of the SLO definition for the monitor. This is only applicable & required for Slo `monitor_type`.
213282
- `queries` - (Required) All queries from the monitor.
214283
- `trigger_conditions` - (Required if not using `triggers`) Defines the conditions of when to send notifications. NOTE: `trigger_conditions` supplants the `triggers` argument.
215284
- `triggers` - (Deprecated) Defines the conditions of when to send notifications.
@@ -336,6 +405,19 @@ Here is a summary of arguments for each condition type (fields which are not mar
336405
#### metrics_missing_data_condition
337406
- `time_range` (Required)
338407
- `trigger_source` (Required)
408+
#### slo_sli_condition
409+
- `critical`
410+
- `sli_threshold` (Required)
411+
- `warning`
412+
- `sli_threshold` (Required)
413+
414+
#### slo_burn_rate_condition
415+
- `critical`
416+
- `time_range` (Required)
417+
- `burn_rate_threshold` (Required)
418+
- `warning`
419+
- `time_range` (Required)
420+
- `burn_rate_threshold` (Required)
339421

340422
## The `triggers` block
341423
The `triggers` block is deprecated. Please use `trigger_conditions` to specify notification conditions.

0 commit comments

Comments
 (0)