norcube monitor monitors run
Run a monitor's check now and show the result
Runs the monitor's check right away (paused monitors too) and prints the stored result. The check is billed like a scheduled one and rate limited (200 per user and 600 per organization an hour).
The check runs while the command waits, so the result is always final. --wait makes the result the command's outcome, for deploy pipelines: it exits 1 with code job_failed (the result in "details") when the check found the monitor critical or couldn't reach a verdict (inconclusive), or with --fail-on warning also when it found a warning, and prints nothing on stdout then; it exits 7 when no result arrives within --wait-timeout. Without --wait the command exits 0 whatever the check found.
Usage
norcube monitor monitors run <monitor> [flags]Examples
norcube monitor monitors run "Shop API"
# Fail a deploy when the site is down after it
norcube monitor monitors run "Shop API" --wait
norcube monitor monitors run 7d1c2f7e-6a1f-4f5e-9b8a-1f7c2b3d4e5f --wait --fail-on warning -o jsonFlags
| Flag | Default | Description |
|---|---|---|
--fail-on | With --wait, the severity that fails the command: critical (default) or warning (inconclusive always fails) | |
--wait | Wait until the check finishes (Ctrl-C stops waiting, not the check) | |
--wait-timeout | 2m0s | Give up waiting after this long (the job keeps running on the server) |
Every command also takes the global flags: --profile, --org, -o, --query, --debug and more.
See also
norcube monitor monitors: Create, inspect and manage monitors and their check history