# Checks and regions

> What a check does for a website, keyword, port, DNS record or ping, which regions run it, how intervals and timeouts work and where checks come from.

Source: https://upfour.io/docs/how/checks-and-regions

What one check does, where it runs from and how often. Read this when a result surprises you.

## What each check does

| Type | What up4 does | Counts as up when |
| --- | --- | --- |
| Website | Sends one HTTP request to the address. | The final answer is a 2xx status, or the status you expect. |
| Keyword | Requests the page with GET and reads it. | The status is 2xx and the word is on the page. An absence check turns this around. |
| Port | Opens a TCP connection to the host and port and closes it. Nothing is sent. | The connection opens. |
| DNS | Asks a DNS server for one record type: A, AAAA, CNAME, MX, NS or TXT. | An answer comes back, and contains the value you expect when you set one. |
| Ping | Sends one ICMP echo to the host. | The host answers within a few seconds. |

The first three need no more than the address. [Check page content](https://upfour.io/docs/check-page-content.md) and [check a server, port or DNS record](https://upfour.io/docs/check-server-port-dns.md) walk through the setup.

## Website checks in detail

**Method.** up4 sends the method shown under **HTTP method**. The app preselects GET. A monitor created through the API without a method uses HEAD. A keyword check always uses GET, because a HEAD answer has no page to read. If a server answers a HEAD request with 405 Method Not Allowed, set the method to GET.

**Redirects.** up4 follows redirects to the final page by default and judges that answer. With **Follow redirects** off, the redirect itself is the answer, so a 301 counts as down unless you expect it as the status. **Keep cookies when redirecting** carries cookies along a redirect chain.

**What counts as up.** A 2xx status, unless you chose an exact status or a keyword. Any other status, a refused or reset connection, a failed name lookup and a timeout all count as down.

**Body and headers.** A request body goes out only with POST, PUT and PATCH, up to 8 KB. Basic auth and your own headers are sent with every check. The checker introduces itself as `up4-checker/1.0`; a user agent header you set wins.

**What up4 reads.** A keyword check reads the first 1 MiB of the page; the failure message says so when the word may sit beyond it. Other checks read only a small part of the answer. The checker does not run JavaScript, so a word that scripts add to the page after loading is not there for it.

## Timeouts

The request timeout is how long up4 waits for an answer before the check counts as failed. It starts at 30 seconds and can go up to 1 minute per monitor. It applies to website, port and DNS checks. A ping never waits longer than a few seconds.

## Certificates and domains

Over HTTPS, up4 checks the certificate by default. An expired, untrusted or mismatched certificate makes the check fail. **Verify the TLS certificate** can be switched off for a test server that uses a self-signed certificate.

Two optional warnings reach you before it happens: **Certificate expiry warning** counts days to the certificate's end, **Domain expiry warning** days to the end of the domain registration. Both are off until you set them.

## Regions

A check runs from a region: **Europe**, **North America**, **Asia** or **Australia**. The picker offers only regions that have a checker online. If you pick one that has just gone quiet, up4 says that no checker is online there and asks you to try again in a minute. How many regions one monitor may use depends on your plan.

Checks come from fixed addresses and identify themselves. [Where checks come from](https://upfour.io/ips) lists them, so you can allow them in a firewall.

Each region runs every check on its own, so regions multiply the cost: a monitor checked every minute from one region costs about €0.39 a month, from three regions about €1.17.

## Several regions

With more than one region, up4 compares them before it alerts: a majority of the monitor's regions must agree, each judged by its latest result within 2 minutes. One region with a bad route to your site does not wake anyone. [When you get alerted](https://upfour.io/docs/how/when-you-get-alerted.md) explains the full rule.

## Intervals

The interval is the time between two checks. Your plan sets the shortest one; up4 refuses a shorter interval and names the minimum. Above that minimum, any whole number of seconds works through the API, and the app offers presets. The app's forms start at three minutes; a monitor created through the API without an interval gets 1 minute.

Monitors that use POST, PUT, PATCH or DELETE need an interval of at least 1 minute.

Shorter intervals notice an outage sooner and cost more, see [what costs money](https://upfour.io/docs/how/what-costs-money.md). The time until an alert depends on more than the interval.

## Slow servers

Response time is measured on every check. **degraded** is a separate, optional signal: with slowdown alerts on, 3 slow checks in a row mark the monitor as degraded, and 3 fast ones clear it. Without a threshold of your own, up4 learns the usual response time of the target.

A server that keeps answering far slower than the interval can also be checked less often than you set, so up4 does not hammer it. A server that is down keeps its set interval.

## What up4 does not do here

- Checks do not sign in to pages behind a login form and do not run JavaScript.
- up4 cannot reach addresses that are only visible inside your network. Private and internal addresses are refused.
- A failure on up4's side, such as a checker without ping permission, is shown as not checked and never opens an incident.
- A keyword check reads only the first 1 MiB of a page.

[Per API POST /v1/monitors](https://upfour.io/docs/api/monitors#post_monitors)

| In the app | API field |
| --- | --- |
| Check every · How often up4 checks. Shorter intervals notice an outage sooner and cost more. | `interval_seconds` |
| Regions · The regions the checks run from. With several regions, up4 compares them before it alerts. | `regions` |
| Request timeout · How long up4 waits for an answer before the check counts as failed. | `request_timeout_s` |
| HTTP method · The method up4 sends with every check. A keyword check cannot use HEAD, because HEAD returns no page. | `http_method` |
| Follow redirects · Whether up4 follows redirects to the final page. Off, the redirect itself is the answer. | `follow_redirects` |
| Verify the TLS certificate · Whether up4 rejects an expired, untrusted or mismatched certificate. Turn it off only for a test server. | `ssl_verification` |

[Full reference](https://upfour.io/docs/api/monitors#post_monitors)
