Skip to content

Commit 7c43b06

Browse files
committed
Add documentation for monitors linked to playbooks
1 parent 9c6ca2b commit 7c43b06

File tree

2 files changed

+56
-0
lines changed

2 files changed

+56
-0
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
## X.Y.Z (Unreleased)
22
* Add new change notes here
33

4+
FEATURES:
5+
* **Updated sumologic_monitor resource:** Added support for automated playbooks in monitors
6+
47
## 3.1.1 (July 8, 2025)
58

69
ENHANCEMENTS:

website/docs/r/monitor.html.markdown

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -417,6 +417,59 @@ resource "sumologic_monitor" "tf_example_metrics_anomaly_monitor" {
417417
}
418418
```
419419

420+
## Example Monitor with linked Playbook
421+
```hcl
422+
resource "sumologic_monitor" "tf_monitor_with_playbook" {
423+
name = "Terraform Monitor with Playbook"
424+
description = "tf monitor with Playbook"
425+
type = "MonitorsLibraryMonitor"
426+
is_disabled = false
427+
content_type = "Monitor"
428+
monitor_type = "Metrics"
429+
evaluation_delay = "1m"
430+
tags = {
431+
"team" = "monitoring"
432+
"application" = "sumologic"
433+
}
434+
435+
queries {
436+
row_id = "A"
437+
query = "metric=CPU* _sourceCategory=event-action"
438+
}
439+
440+
trigger_conditions {
441+
metrics_static_condition {
442+
critical {
443+
time_range = "15m"
444+
occurrence_type = "Always"
445+
alert {
446+
threshold = 40.0
447+
threshold_type = "GreaterThan"
448+
min_data_points = 5
449+
}
450+
resolution {
451+
threshold = 40.0
452+
threshold_type = "LessThanOrEqual"
453+
}
454+
}
455+
}
456+
}
457+
notifications {
458+
notification {
459+
connection_type = "Email"
460+
recipients = ["[email protected]"]
461+
subject = "Triggered {{TriggerType}} Alert on Monitor {{Name}}"
462+
time_zone = "PST"
463+
message_body = "Triggered {{TriggerType}} Alert on {{Name}}: {{QueryURL}}"
464+
}
465+
run_for_trigger_types = ["Critical", "ResolvedCritical"]
466+
}
467+
playbook = "test playbook"
468+
automated_playbook_ids = ["000000000000000000000foo"]
469+
notification_group_fields = ["metric"]
470+
}
471+
```
472+
420473
## Monitor Folders
421474

422475
NOTE: Monitor folders are considered a different resource from Library content folders. See [sumologic_monitor_folder][2] for more details.

0 commit comments

Comments
 (0)