Skip to Content
CLIMonitors

Monitors

Alert when a metric crosses a threshold. See Monitoring for states, warning tiers and episodes.

Requires contract.dev login and at least one alert destination connected in the app (Monitoring → Destinations).

monitor add <metric> <rule> --to <dest,…>

contract.dev monitor add <metric> <rule> --to <dest,…> [--warn …] [--name "…"] [--max-age <sec>]

<metric> is a tracked metric’s id or label (contract.dev metrics). Exactly one rule:

RuleAlerts when
--below <n>the metric falls below n
--above <n>the metric rises above n
--below-metric <metric>it falls below another metric
--above-metric <metric>it rises above another metric

Optional warning tier, on the healthy side of the alert:

FlagWith
--warn <n>--below / --above — a number
--warn-pct <p>--below-metric / --above-metric — a margin in percent
FlagDescription
--to <dest,…>Destination ids, labels ("#alerts") or kinds (telegram) from contract.dev channels. Required.
--name "…"The monitor’s name. Defaults to the metric’s label, or A vs B for a comparison.
--max-age <sec>Treat a reading older than this as too old to judge on: the monitor’s status reads stale in monitors and monitor show, and an open episode stays open. Minimum 30.
contract.dev monitor add "Treasury · Native balance" --below 25000 --warn 30000 --to telegram contract.dev monitor add vault_reserves --below-metric vault_liabilities --warn-pct 5 --to "#alerts" contract.dev monitor add "Share price" --below 0.98 --to telegram,slack --name "Share price floor"
Created monitor "Treasury · Native balance" (cmfz0x9d40007wxyz…): treasury_native_balance >= 25000, warn at treasury_native_balance >= 30000 First verdict on the next reading.

Thresholds are in the metric’s display units, per its --decimals.

monitors

List monitors with status, rule and any open episode.

contract.dev monitors
healthy cmfz0x9d40007wxyz… Treasury · Native balance — treasury_native_balance >= 25000 (warn: treasury_native_balance >= 30000) alerting cmfz1a2b30009abcd… Share price floor — share_price >= 0.98 OPEN alert since 2026-09-20T08:51:03.000Z

monitor show <id|name>

Rule, inputs and their current values, destinations, and recent episodes.

monitor set <id|name> …

Change the rule, warning or destinations of an existing monitor. Same flags as add; --no-warn removes the warning tier, --no-max-age the staleness override.

contract.dev monitor set "Share price floor" --below 0.97 --warn 0.99 contract.dev monitor set "Share price floor" --to telegram

Lifecycle

contract.dev monitor rename <id|name> "<name>" contract.dev monitor pause <id|name> # stop evaluating, send nothing contract.dev monitor resume <id|name> contract.dev monitor snooze <id|name> 2h # mute pages until then; still evaluates (30m, 2h, 1d or an ISO time) contract.dev monitor unsnooze <id|name> contract.dev monitor delete <id|name>

Snooze mutes notifications; evaluation and history continue. Pause stops evaluation.

Default monitors

The three default monitors — control-change, dependency-failure and revert-spike — appear in contract.dev monitors and take pause, resume, snooze, unsnooze and set --to by that slug or by name. Their thresholds cannot be edited and they cannot be deleted.

contract.dev monitor pause revert-spike contract.dev monitor snooze dependency-failure 1d contract.dev monitor set control-change --to telegram

monitor exclude / monitor include

Leave a contract out of a default monitor, or put it back.

contract.dev monitor exclude revert-spike 0xPool… --chain arbitrum contract.dev monitor include revert-spike 0xPool… --chain arbitrum
Excluded 0xc903…acaa on chain 42161 from Revert spike.

monitor show on a default monitor lists the contracts it covers with each one’s state and the open episode’s reading, and the excluded contracts.

Revert spike (cmg…) status: alerting sends to: every destination covers: 12 contracts alerting chain 1 0xa0b8… Reverting 6.7% of transactions in the last hour, 24h rate 1.1% healthy chain 43114 0x9702… excluded: 42161:0xc903…

channels

List the workspace’s alert destinations — what --to accepts — and test, disable, enable or remove one.

contract.dev channels contract.dev channels test telegram # send a test alert contract.dev channels disable "#alerts" # keep it, send nothing contract.dev channels enable "#alerts" contract.dev channels remove cmfyx3… # disconnect it
cmfyx1… telegram Ops group -1001234567890 cmfyx2… slack #alerts T0…/B0… cmfyx3… discord_bot #ops Acme

A destination is named by its id, label (with or without the #) or kind, when the workspace has one of that kind. Testing, enabling, disabling and removing need an owner or admin, as in the app. Destinations are connected in the app under Monitoring → Destinations. See Destinations.

Last updated on