Website and API Monitors
A Website Monitor sends a request to one URL, the way a browser or an API client would, and checks the answer. Choose Website when you press New Monitor. Its request settings are under Request, and they start as a plain GET that expects 2xx.
The page or endpoint to request, starting with http:// or https://. You cannot change it after you create the Monitor.
The URL may name a port, except the ports browsers refuse to send a request to, such as those of mail and chat servers. A request whose body you write could be read by such a server as its own commands, so we refuse them too. The usual ports of http and https are not on the list.
The ports a URL may not name
0, 1, 7, 9, 11, 13, 15, 17, 19, 20, 21, 22, 23, 25, 37, 42, 43, 53, 69, 77, 79, 87, 95, 101, 102, 103, 104, 109, 110, 111, 113, 115, 117, 119, 123, 135, 137, 139, 143, 161, 179, 389, 427, 465, 512, 513, 514, 515, 526, 530, 531, 532, 540, 548, 554, 556, 563, 587, 601, 636, 989, 990, 993, 995, 1719, 1720, 1723, 2049, 3659, 4045, 4190, 5060, 5061, 6000, 6566, 6665, 6666, 6667, 6668, 6669, 6679, 6697, 10080
A URL whose name points to a private address, such as one inside your own network, fails: we cannot reach it from the internet. Use a public address for the Monitor.
Method
Section titled “Method”One of GET, HEAD, POST, PUT, PATCH or DELETE. A POST, PUT, PATCH or DELETE request may change data in your system each time we send it, so a Monitor with one of these methods runs no more often than every 15 minutes. See What a Monitor that changes data costs below.
Headers
Section titled “Headers”Press Add header to send a header of your own, up to 20 headers, 8 KB in all, names and values together.
We set these headers ourselves, and you cannot set them: host, user-agent, x-uup-check, accept-encoding, connection, content-length, transfer-encoding, te, trailer, upgrade, keep-alive and expect, and any header whose name starts with proxy-.
Every request carries our User-Agent, Mozilla/5.0 (compatible; uup/1.0; +https://uup.dev/probe), and an x-uup-check header that names the Check it comes from. They let you, and anyone who reads your logs, tell our checks from other traffic.
Header values are sealed when you save the Monitor: the dashboard never shows them again. To change the request later, enter them again.
A POST, PUT, PATCH or DELETE request can carry a body of up to 64 KB. Set its type as a header, such as content-type: application/json. We send its length ourselves. The body is sealed when you save, like the header values.
None, Bearer token or Basic. A token, a username and a password are sealed when you save. Set authorization as a header or as auth, not both.
Expected status
Section titled “Expected status”The statuses that count as a good answer. Enter up to 10 statuses, separated by commas. Write a code such as 200, or a class such as 2xx. A code such as 404 lets you watch that a page stays gone.
Only the last answer is judged, after any redirects.
Follow redirects
Section titled “Follow redirects”On unless you turn it off. We follow up to 5 redirects, and judge the answer at the end. A redirect fails the run when it goes from an https address to a plain http one, to a port on the list above, or to a private address.
Turned off, the first answer is the last one: a 301 is then judged against the expected status like any other code.
Timeout
Section titled “Timeout”How long one request may take, from looking up the name to the end of the answer: from 1 second to 30 seconds, and 10 seconds unless you change it. A request that takes longer fails.
Assertions
Section titled “Assertions”An assertion checks what the page says, not only that it answers. A Monitor can have up to 10 assertions, and every one must hold for the run to pass. When more than one fails, the first in the list is the one reported.
Press Add keyword for text the page must contain, or must not: Contains or Does not contain, and up to 256 characters. Matching is exact, capitals included.
Press Add JSON path to pick one value from a JSON answer and compare it. The path starts with $, then names one value at a time: .status, ["status"], or [0] for the first item of a list. $.checks[0].state is the state of the first item in checks. A path that would pick more than one value is refused. Then choose the operator:
| Operator | Your value | Holds when |
|---|---|---|
| Equals | Any value | It is the same type and the same value. |
| Does not equal | Any value | It is not the same type and value. |
| Is less than | A number | It is a number below yours. |
| Is at most | A number | It is a number no more than yours. |
| Is more than | A number | It is a number above yours. |
| Is at least | A number | It is a number no less than yours. |
| Contains | Any value | It is text holding yours, or a list holding your value. |
| Exists | No value | The path picks a value. |
| Does not exist | No value | The path picks nothing. |
The value is JSON: 200 is a number and "200" is text, so the two never equal each other. A path that picks nothing fails every operator but Does not exist.
A HEAD answer has no body, so a HEAD Monitor cannot have assertions.
The Test before you create it
Section titled “The Test before you create it”A Monitor with an assertion needs a test of its settings before you create it. Press Test: one location sends the request once and shows what it found, such as which assertion did not hold. Change a setting and the test is needed again. When the test fails, you can still create the Monitor with Create anyway, because your page may really be failing right now.
The most we read
Section titled “The most we read”Without assertions, we read the status and the headers, then close the connection without downloading the page. When the status is not one you expect, we also read the start of the body, to show you what the page said.
With assertions, we read the first 1 MB of the body at most, counted as it arrives and again after it is unpacked. We stop sooner when every assertion is decided, when the body ends, or when the timeout runs out. A Contains assertion is decided as soon as its text is found. A body cut off at that size while an assertion is still undecided fails the run: we never report a page as healthy when we did not read the part that matters.
What a Monitor that changes data costs
Section titled “What a Monitor that changes data costs”Each run of a POST, PUT, PATCH or DELETE Monitor is a real request to your system, and may create real data each time: an order, a sign-up, a message. Every location sends its own, at the interval you choose. Under Interval, the form says how many requests a day that makes, as you choose the locations and the interval.
- Such a Monitor runs no more often than every 15 minutes, on every Plan.
- Every request carries the
x-uup-checkheader, so your server can recognize our checks and skip the side effect. - When a run fails, we try again and ask other locations to check too, so a failure sends a few requests more than the count the form shows.
Interval and the traffic we send works out what every Monitor sends, in requests a minute and a day.