Skip to content

Commit 0a79200

Browse files
SUMO-231087 improve documentation
1 parent 8bbb327 commit 0a79200

File tree

1 file changed

+31
-81
lines changed

1 file changed

+31
-81
lines changed

website/docs/r/muting_schedule.html.markdown

Lines changed: 31 additions & 81 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,11 @@ description: |-
99

1010
Provides the ability to create, read, delete, and update [MutingSchedule][1].
1111

12-
## Example One-time Muting Schedule From 12:00 AM To 1:00 AM On 2023-08-05 For All monitor
12+
## Example One-Time Muting Schedule From 12AM to 1AM on 2023-08-05 for All Monitors
1313

1414
```hcl
1515
resource "sumologic_muting_schedule" "muting_schedule" {
16-
name = "Muting Schedule For one time"
17-
description = "This is an example for one time Muting schedule for all monitor"
16+
name = "One-Time Schedule for All Monitors"
1817
type = "MutingSchedulesLibraryMutingSchedule"
1918
content_type = "MutingSchedule"
2019
monitor {
@@ -29,125 +28,76 @@ resource "sumologic_muting_schedule" "muting_schedule" {
2928
}
3029
```
3130

32-
## Example One-time Muting Schedule From 12:00 AM To 1:00 AM On 2023-08-05 For Specifc Monitor/Folder ids
31+
## Example Daily Muting Schedule From 9AM to 10AM and 5PM to 6PM Starting On 2023-08-05 for a Monitor or Folder
3332

3433
```hcl
3534
resource "sumologic_muting_schedule" "muting_schedule" {
36-
name = "Muting Schedule For one time"
37-
description = "This is an example for one time muting schedule for all monitor"
35+
name = "Daily schedule at 9am and 5pm for 30 minutes for all monitors"
3836
type = "MutingSchedulesLibraryMutingSchedule"
3937
content_type = "MutingSchedule"
4038
monitor {
41-
ids = ["0000000000200B92"]
39+
ids = ["0000000000000002"]
4240
}
4341
schedule {
4442
timezone = "America/Los_Angeles"
4543
start_date = "2023-08-05"
4644
start_time = "00:00"
4745
duration = 60
46+
rrule = "FREQ=DAILY;INTERVAL=1;BYHOUR=9,17"
4847
}
4948
}
5049
```
5150

52-
## Example Daily Muting Schedule From 9:00 AM to 9:30 and 10:00 AM to 10:30 AM Since 2023-08-05 For All monitor
51+
## Example Muting Schedule for an Alert Group on All Monitors Every 3rd Saturday from 12AM to 1AM
5352

5453
```hcl
5554
resource "sumologic_muting_schedule" "muting_schedule" {
56-
name = "Muting Schedule For one time"
57-
description = "This is an example for one time muting schedule for all monitor"
55+
name = "Muting alerts from us-east-1 every 3rd saturday from 12AM to 1AM"
5856
type = "MutingSchedulesLibraryMutingSchedule"
5957
content_type = "MutingSchedule"
6058
monitor {
61-
all = true
59+
all = true
60+
}
61+
notification_groups {
62+
group_key = "region"
63+
group_values =["us-east-1"]
6264
}
6365
schedule {
64-
timezone = "America/Los_Angeles"
65-
start_date = "2023-08-05"
66-
start_time = "00:00"
67-
duration = 30
68-
rrule = "FREQ=DAILY;INTERVAL=1;BYHOUR=9,10"
66+
timezone = "America/Los_Angeles"
67+
start_date = "2023-08-05"
68+
start_time = "00:00"
69+
duration = 60
70+
rrule = "FREQ=MONTHLY;INTERVAL=1;BYDAY=+3SA"
6971
}
7072
}
7173
```
7274

73-
## Example Daily Muting Schedule From 9:00 AM to 9:30 and 10:00 AM to 10:30 AM Since 2023-08-05 For Specific Monitor/Folder ids
74-
75-
```hcl
76-
resource "sumologic_muting_schedule" "muting_schedule" {
77-
name = "Muting Schedule For one time"
78-
description = "This is an example for muting schedule with rrule and specific monitor id"
79-
type = "MutingSchedulesLibraryMutingSchedule"
80-
content_type = "MutingSchedule"
81-
monitor {
82-
ids = ["0000000000200B92"]
83-
}
84-
schedule {
85-
timezone = "America/Los_Angeles"
86-
start_date = "2023-08-05"
87-
start_time = "00:00"
88-
duration = 30
89-
rrule = "FREQ=DAILY;INTERVAL=1;BYHOUR=9,10"
90-
}
91-
}
92-
```
93-
94-
## Example Daily Muting Schedule With Group Supporting
95-
96-
```hcl
97-
resource "sumologic_muting_schedule" "muting_schedule" {
98-
name = "Muting Schedule For one time"
99-
description = "This is an example for muting schedule with rrule and specific monitor id and notification group key and values"
100-
type = "MutingSchedulesLibraryMutingSchedule"
101-
content_type = "MutingSchedule"
102-
monitor {
103-
ids = ["0000000000200B92"]
104-
}
105-
notification_groups {
106-
group_key = "_sources"
107-
group_values =["localhost","127.0.0.1"]
108-
}
109-
schedule {
110-
timezone = "America/Los_Angeles"
111-
start_date = "2023-08-05"
112-
start_time = "00:00"
113-
duration = 30
114-
rrule = "FREQ=DAILY;INTERVAL=1;BYHOUR=9,10"
115-
}
116-
}
117-
```
118-
11975
## Argument reference
12076

12177
The following arguments are supported:
12278

123-
- `type` - (Optional) The type of object model. Valid value:
124-
- `MutingSchedulesLibraryMutingSchedule`
125-
- `name` - (Required) The name of the muting schedule. The name must be alphanumeric.
126-
- `description` - (Optional) The description of the muting schedule.
127-
- `content_type` - (Optional) The type of the content object. Valid value:
128-
- `MutingSchedule`
129-
- `monitor` - (Optional) The monitors which need to put in the muting schedule. see `monitor_scope`:
130-
- `schedule` - (Required) The schedule information. see `schedule`.
131-
- `notification_groups` -(Optional) The muting schedule group supporting key and values. see `notification_group`
79+
- `type` - (Required) The type of object model. Valid value: `MutingSchedulesLibraryMutingSchedule`
80+
- `name` - (Required) Name of the muting schedule.
81+
- `description` - (Optional) Description of the muting schedule.
82+
- `content_type` - (Optional) The type of the content object. Valid value: `MutingSchedule`
83+
- `monitor` - (Optional) Monitor scope that the schedule applies to. See `Monitor Scope` for more details.
84+
- `schedule` - (Required) Schedule definition. See `Schedule Definition` for more details.
85+
- `notification_groups` - (Optional) Alert group scope that the schedule applies to. See `Group Scope` for more details.
13286

133-
#### schedule
87+
#### Schedule Definition
13488
- `timezone` - (Required) Time zone for the schedule per
13589
[IANA Time Zone Database](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones#List).
13690
- `start_date` - (Required) Schedule start date in the format of `yyyy-mm-dd`
13791
- `start_time` - (Required) Schedule start time in the format of `hh:mm`
13892
- `duration` - (Required) Duration of the muting in minutes
139-
- `rrule` - (Optional) RRule (Recurrence Rule) Below are some examples of how to represent recurring events using the RRULE format:
140-
A rule occurring on the third Sunday of April would be as follows: `FREQ=YEARLY;BYMONTH=4;BYDAY=SU;BYSETPOS=3`
141-
An event occurring on the first and second Monday of October would be specified by the rule: `FREQ=YEARLY;BYMONTH=10;BYDAY=MO;BYSETPOS=1,2`
142-
Event that repeats monthly: every 29th of every other month! `FREQ=MONTHLY;INTERVAL=2;BYMONTHDAY=29`
143-
(https://freetools.textmagic.com/rrule-generator)
93+
- `rrule` - (Optional) Recurrence Rule. See https://freetools.textmagic.com/rrule-generator for more details.
14494

145-
#### monitor_scope
95+
#### Monitor Scope
14696
- `ids` - (Optional) List of monitor Ids in hex. Must be empty if `all` is true.
14797
- `all` - (Optional) True if the schedule applies to all monitors
14898

149-
#### notification_group
150-
- `group_key` - (Required) the monitor notification group key .
151-
- `group_values` - (Required) List of monitor notification group values.
99+
#### Group Scope
100+
- `group_key` - (Required) Field name of an alert group defined in monitors. See [Alert Grouping](https://help.sumologic.com/docs/alerts/monitors/alert-grouping/) for more details.
101+
- `group_values` - (Required) Values of alert groups generated by monitors
152102

153103
[1]: https://help.sumologic.com/docs/alerts/monitors/muting-schedules/

0 commit comments

Comments
 (0)