Skip to main content

Returns

Returns the updated Monitor object.

Example

# Pause a monitor (stops scoring until resumed). Users may only set ACTIVE or PAUSED.
galtea.monitors.update(monitor.id, status="PAUSED")

# Resume it, and raise the sampling rate at the same time.
galtea.monitors.update(monitor.id, status="ACTIVE", sampling_percentage=25)
Pause and resume are just a status update. Users may set only ACTIVE (resume) or PAUSED (pause); CAPPED, NO_CREDITS, and FAILING are system-set and are rejected.

Parameters

monitor_id
string
required
The ID of the monitor to update.
name
string
New name for the monitor.
version_id
string
New version to watch. Pass None to watch every version of the product.
metric_group_ids
list[string]
New metric family IDs (metric.metric_group_id) to score with.
sampling_percentage
number
New sampling percentage, from just above 0 up to 100.
monthly_credit_cap
int
New monthly credit cap. Must be positive when set. Pass None for no cap.
inactivity_window_minutes
int
New inactivity window in minutes.
status
string | MonitorStatus
New status. Valid user-settable values: ACTIVE (resume), PAUSED (pause).
Only the fields you pass are updated. Any field you omit is left unchanged. Pass None to clear a nullable field such as version_id or monthly_credit_cap.