Custom status page check Beta
Type httpcustom: fetch a status document your own endpoint returns, read one field out of it, and check what it says. Use it when "the page loads" isn't the question, but "the queue is healthy" is.
There is no separate endpoint for this: it is the ordinary create a monitor call with type set to "httpcustom". The same settings apply when you update a monitor with PATCH /api/v1/monitors/{id}.
Every type shares the same interval, retries, alerting, maintenance, results and reports. Only the settings below differ. See Check types for how the nine types compare.
Up or down
- The document is fetched with the ordinary web check first, so the status code, timeout, headers, authentication and certificate rules all apply.
customFieldnames the field to read. It's required for this type.- If
customExpectedis set, the field must equal it, ignoring case and surrounding spaces. Leave it empty to check only that the field exists. - A missing field is a failure: The reply has no "…" field.
Reading the field
- JSON:
customFieldis a dotted path, sostatus.statereads{ "status": { "state": "ok" } }. A number in the path indexes an array, as inservices.0.state. - XML: the last part of the path is treated as a tag name, and then as an attribute name if no tag matches.
statusreads<status>ok</status>or<health status="ok"/>. Text in CDATA is unwrapped. - JSON is tried first; anything that doesn't parse is read as XML.
Settings that apply
| Setting | Notes |
|---|---|
url | The endpoint returning the status document. |
customField required | The field to read. Up to 200 characters. |
customExpected | The value it must hold. Up to 200 characters. Empty means the field only has to exist. |
| Every web setting | Timeout, headers, authentication, certificate rules, locations and text checks all still apply. |
Create one
- {
- "status": { "state": "ok", "queueDepth": 12 },
- "version": "3.4.1"
- }
That monitor goes down as soon as status.state is anything other than ok, even though the page still returns 200.
Related
- Website check: the plain page check
- Monitor settings: every field in full