Returns
Returns the updated Monitor object.Example
monitors.pause() and monitors.resume(). Setting status here still works. Users may set only ACTIVE (resume) or PAUSED (pause); CAPPED, NO_CREDITS, and FAILING are system-set and are rejected.
Parameters
string
required
The ID of the monitor to update.
string
New name for the monitor.
string
New version to watch. Pass
None to watch every version of the product.list[string]
New metric family IDs (
metric.metric_group_id) to score with. Adding a self-hosted metric family
raises an error, for the same reason as on create. So does a newly bound
Classifier (Jev) family when classifier metrics are off on the
deployment. A family the monitor already binds can still be resent: only a newly bound family is checked.number
New sampling percentage, from just above
0 up to 100.int
New monthly credit cap. Must be positive when set. Pass
None for no cap.string | MonitorStatus
list[string]
New Specification IDs to bind. The list replaces the bound Specifications, and an empty list unbinds them all.
Only Policy and Capability Specifications of the monitor’s product are accepted. The update is refused when
the monitor would be left with nothing to score. Removing a Specification deletes the alert rules on that
Specification and on the families that only it brought.
list[MonitorMessageCondition]
New conditions on a session’s number of messages, joined by AND. The list replaces the stored conditions. Pass
[] to turn the filter off.
None is refused. At most 10 conditions. Each MonitorMessageCondition has a count (messages or user_messages), an operator (lt, lte, eq, gte or gt) and a value (an integer from 0 to 200; lt with 0 is refused). A list that no session can meet is refused too, such as messages gt 5 with messages lte 3, or more user messages than the messages allow.
The change applies to sessions that close after the update.Only the fields you pass are updated. Any field you omit is left unchanged. Pass
None to clear version_id or monthly_credit_cap. The other fields refuse None: leave them out to keep their value, or pass an empty list to clear metric_group_ids, specification_ids or message_conditions.