A monitor on its own only knows up and down. Rules connect it to the page: which component it speaks for, what status to set, and whether to open an incident. They are the part that lets the page stay right at 3 am.
Add a rule
Open the monitor and find Rules. Each rule has three settings:
Componentselectrequired- The component this monitor represents. Any component on any page in the workspace.
On failure, set status toselect- The status the component takes when the monitor goes down. Default is Outage; use Degraded for something that slows rather than breaks.
IncidentselectNone: only the status changes.Draft(default): an incident is created but not published, for you to review.Publish: the incident is published immediately and subscribers are notified.
A rule can name a message template for the incident's words. Without one a short default is used.
A monitor can have several rules, for example to drive a component on the public page and another on an internal page. Saving replaces the whole set.
What happens on failure
- The monitor reaches its failure threshold and is marked down. A
monitor.downevent goes to outbound webhooks. - For each rule, the component's status is set as configured. The page snapshot rebuilds within seconds.
- If the rule says draft, an incident appears under Drafts with the affected component and the template's wording. If it says publish, it goes live and subscribers hear about it.
What happens on recovery
- The monitor reaches its recovery threshold and is marked up.
monitor.upgoes to webhooks. - Each component is set back to Operational, but only if it still has the status the rule set. If someone changed it by hand in the meantime, the manual status wins.
- Open incidents that this monitor created get an automated update and are resolved.
Manual changes and incidents still win
Rules never fight a person. A manual status override, or an incident that sets a component override, takes precedence until it is cleared. Rules only restore Operational when the component is exactly as they left it.
API
PUT /user/monitors/:id/rules replaces the rule set with [{ component_id, set_component_status, auto_incident, incident_template_id }]. See Monitors in the API reference.