Incidents.MonitorGroup
A Better Stack Uptime monitor group: organizes related monitors, and pauses
or resumes all of them at once with paused. Monitors join it through
their monitorGroupId.
name defaults to a generated unique name. paused can only be set by an
update, so a group created with paused: true is paused right after create.
teamId replaces the group when changed.
Creating a monitor group
Section titled “Creating a monitor group”A group with monitors in it
const group = yield* BetterStack.Incidents.MonitorGroup("public", { name: "Public endpoints", sortIndex: 1,});yield* BetterStack.Incidents.Monitor("site", { url: "https://example.com", monitorType: "status", monitorGroupId: group.id,});Pausing every monitor in a group
Section titled “Pausing every monitor in a group”Maintenance
yield* BetterStack.Incidents.MonitorGroup("public", { name: "Public endpoints", paused: true });name string
Group name. Defaults to a unique name generated from the stack, stage and logical id.
paused boolean
Whether every monitor in the group is paused, false when the group has none. Send true to pause every monitor in the group or false to resume them. Has no effect on create.
sortIndex number | null
The position of the group in your list of monitor groups, lower values first. null when no position was set.
teamId string
Team that owns the resource, such as t123. Defaults to the credentials' team (BETTERSTACK_TEAM_ID, or the profile's team). Changing it replaces the resource.
Attributes
Section titled “Attributes”id string always set
The monitor_group's id.
createdAt string
When the group was created.
name string
Group name.
paused boolean
Whether every monitor in the group is paused, false when the group has none.
sortIndex number | null
The position of the group in your list of monitor groups, lower values first. null when no position was set.
teamId string
Team that owns this monitor group, such as t123.
teamName string
Name of the team that owns this monitor group.
updatedAt string
When the group was last updated.
Lookup
Section titled “Lookup”MonitorGroup.lookup(props) reads an object this stack does not manage. It is never created, updated or deleted.
id string required
The group's id.
teamId string
Team that owns it, such as t123. Defaults to the credentials' team.