External reports
Some checks cannot be run from a probe: a nightly backup, a replication lag read on the database itself, a batch that must finish before the office opens. An external report monitor is a monitor Sartar never runs. Your own script does the check and reports the result; Sartar keeps the history, draws the charts, opens and closes the alerts, and — if you ask for it — alerts when the report does not come.
Create the monitor
In the web UI, choose the type External result when creating a monitor. With the CLI:
sartar monitor create --name "/prod/nightly backup" --type external.report \
--expect-every 24h --grace 30mThere is no --url, no period and no region: nothing is scheduled. The
monitor shows as manual in the lists, and monitor run-now is refused — the
only way to give it a result is to report one. The type cannot change
afterwards; the deadline can (monitor update … --expect-every 12h,
--no-expect-every removes it).
Report a result
The simple form
sartar monitor report --name "/prod/nightly backup" --ok --timing 84s
sartar monitor report --name "/prod/nightly backup" --failed "pg_dump exit 1"--ok says the check went well; --failed says it did not, with the reason
shown in the alert. --timing is how long the check took (84s, 1.27s,
840ms): it feeds the response-time chart and, when you do not judge the
performance yourself, Sartar judges it against the monitor's performance
thresholds. --at dates the check (RFC 3339, 2026-10-29T02:14:00Z); without
it, the report is dated when it arrives.
The answer is accepted: the report is queued like a probe's result, and the status follows within seconds.
The four axes
A result in Sartar has four independent axes — did you reach the target (connectivity), is its certificate sound (certificate), was it fast enough (performance), was the content what you expected (content). A script that knows the difference between "I could not reach the database" and "the database answers but replication is late" can say so, one flag per axis:
sartar monitor report --name "/prod/replica" --timing 1.27s \
--connectivity ok --certificate warning --days-left 9 \
--content bad:json --content-message "replication lag 312 s > 30 s"Each axis takes ok, warning or bad, optionally followed by :reason,
plus a --<axis>-message shown in the alert. Connectivity and content know
only ok and bad.
| Axis | Reasons |
|---|---|
--connectivity |
dns, refused, timeout, unreachable, reset, closed, tls |
--certificate |
expired, untrusted, name, protocol, not-yet-valid (required on bad); --days-left <n> with a warning |
--performance |
none — or leave it out and let --timing decide |
--content |
status, header, cookie, body, json |
An axis you do not mention is not evaluated: it never alerts and does not
count against availability. The simple form is a shortcut: --ok is
connectivity ok and content ok, --failed is connectivity ok and content bad.
With curl
A cron job does not need the CLI. The same report is one HTTP call with an API key; the version header is required:
curl -fsS -X POST "https://sartar.app/api/monitors/<uuid>/results" \
-H "Authorization: Bearer $SARTAR_TOKEN" \
-H "X-Sartar-Api-Version: 3.2" \
-H "Content-Type: application/json" \
-d '{"ok":true,"timingMs":84000}'The monitor's editor shows this command with the uuid filled in, ready to
copy. The body takes ok and message, or the axes as objects —
{"connectivity":{"status":"ok"},"content":{"status":"bad","reason":"json","message":"replication lag 312 s > 30 s"}}
— plus timingMs and at.
The deadline
Without --expect-every, silence never alerts: a backup script that was never
started reports nothing, and Sartar sees nothing wrong. With it, a report is
expected at least every so often (from 60 s to 31 days: 24h, 30m, 7d).
Once the deadline plus the grace has passed with no report, the monitor goes
down with "report overdue" and the alert goes out like any other; the next
report closes it. The grace (--grace) is 10 % of the deadline by default, at
least 30 s. One "overdue" result is recorded per missed period, so a week of
silence on a daily report shows as seven, not as one.
Rules
- One report every 10 seconds per monitor. A second one sooner is refused
(HTTP 429, with
Retry-After). - In order. A report dated before the previous accepted result is refused
(409
out_of_order);--atmay be up to 7 days back and never more than a minute in the future. - The monitor must be of this type. Reporting to an HTTP or TCP monitor is
refused (409
not_external). - A report must say something:
--ok,--failed, an axis or a--timing(400 otherwise). - Messages are 500 characters at most.
By name. Instead of the uuid, give _ and the monitor's folder-qualified
name, URL-encoded, in name: Sartar finds the monitor in the account of the
key, so the script does not look it up first. sartar monitor report --name
does the same. A name that two monitors share is refused (409 ambiguous):
use the uuid then.
curl -fsS -X POST "https://sartar.app/api/monitors/_/results?name=%2Fprod%2Fnightly%20backup" \
-H "Authorization: Bearer $SARTAR_TOKEN" \
-H "X-Sartar-Api-Version: 3.6" \
-H "Content-Type: application/json" \
-d '{"ok":true}'The Reporter role
Reporting needs a key whose role holds monitor:report. The system role
Reporter holds exactly that: give a script a Reporter key and it can
report, by uuid or by name, and change nothing — not even the monitor it
reports to. Like every key, it can still read the account. Any write key
reports too.
What it does not do
Sartar does not run your script, does not retry it, and does not know what it
checked beyond what the report says. A report has no region. The phases of a
request (DNS, TCP, TLS…) are not reported: --timing is one number, one layer
in the chart.