3.6Run a check now
You can run a check straight away instead of waiting for the next interval. For example, run one right after a deploy or a fix.
In the dashboard#
- Open the monitor and select Edit. The button is on the edit page only, not on the monitor page.
- At the bottom of the page, select run once now.
- The button shows
queueing…, thenqueued — the result will appear on its own. - The result appears with the monitor's other checks.
If the request fails, the reason shows next to the button. The button is disabled in these cases. Hover over it to see why:
| Case | Hover text |
|---|---|
| You are still creating the monitor | Create the monitor first — there is nothing to run yet |
| Heartbeat monitor (the button reads send test ping) | This monitor reports in on its own; there is nothing to dispatch |
| Paused monitor | This monitor is paused — resume it to run a check |
Rules#
- You can run each monitor at most once every 30 seconds. If you try sooner, you get
check just ran — try again in Ns, where N is the number of seconds to wait. - A request that is refused or fails does not start the 30-second wait.
- A check you run now does not change the schedule. The next regular check still runs on time.
- The check runs from one region. The dashboard uses the monitor's first region.
- For browser monitors, each check you run now counts as one browser run.
With the API#
Use TriggerNow to run a check from a script, such as a deploy pipeline. Send the monitor's ID. Chapter 13 shows how to set OBSRVLY_KEY.
API=https://www.obsrvly.com/api/gw
curl -s "$API/scheduler/obsrvly.v1.SchedulerService/TriggerNow" \
-H "Authorization: Bearer $OBSRVLY_KEY" \
-H "Content-Type: application/json" \
-d '{"monitorId": "<monitor-id>"}'- To run from a specific region, add
location, for example"location": "eu-west". The region must be one the monitor uses. Otherwise you getmonitor does not run from "eu-west". - The response has
executionIdandlocation.executionIdonly identifies your request. You cannot use it to look up the result. - To see the result, list the monitor's checks with
ListExecutions(chapter 13).
Errors you may get:
| Code | Message | What to do |
|---|---|---|
resource_exhausted (HTTP 429) | check just ran — try again in Ns | Wait N seconds, then try again. |
failed_precondition | monitor is paused — resume it before running a check | Resume the monitor (3.3). |
failed_precondition | this monitor type is not dispatched — it reports in on its own | Heartbeat monitors cannot be run. Send a ping instead (chapter 5). |
not_found | monitor not found | Check the monitor ID and your API key's team. |
invalid_argument | monitor_id required | Send monitorId in the body. |