Skip to content
betterstack-alchemyUnofficial

Incidents.MonitorGroup

Kind ResourceType id BetterStack.Incidents.MonitorGroupSource src/Incidents/MonitorGroup.tsLive test available A live lifecycle test exists: it runs against the offline mock by default and against the real API under bun run test:live. This records that the test exists, not a dated live run (see Compatibility). Test file: test/Incidents/MonitorGroup.test.ts.

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.

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,
});

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.

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.

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.