> ## Documentation Index
> Fetch the complete documentation index at: https://tinyanalytics.io/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Website and API Uptime Monitoring

> Probe a website or API on a schedule, record response times, open incidents after repeated failures, and alert your notification channels.

Uptime monitoring checks that your site or API stays reachable and alerts you when it doesn't. You add a monitor with a URL and a check interval; tinyanalytics probes it on schedule, records the response time, and **opens an incident** when it fails — so you hear about downtime before your customers do.

## Add a monitor

A monitor watches one endpoint. Choose the type and how often to check it:

* **HTTP / HTTPS** — request a URL and check the response. Add authentication headers (basic, bearer, or API key), a custom user agent, or a request body if the endpoint needs them; redirects are followed automatically.
* **TCP** — check that a host and port accept a connection.

## Decide what counts as "up"

For an HTTP monitor, you can go beyond "did it respond" and require the response to pass rules:

| Rule              | Passes when the response…                       |
| ----------------- | ----------------------------------------------- |
| **Status code**   | matches (or doesn't match) the codes you allow  |
| **Response time** | stays under your threshold                      |
| **Response size** | stays within your bounds                        |
| **Body**          | contains — or doesn't contain — a string        |
| **Header**        | has a header, or a header with a specific value |

If any rule fails, the check is recorded as a failure.

## When does an incident open?

tinyanalytics doesn't page you for a single blip:

* An **incident opens on the second consecutive failure** — one bad check isn't an outage.
* It **resolves on the second consecutive success** — one lucky check isn't a recovery.

When an incident opens or resolves, tinyanalytics notifies your channels — **email, Slack, Discord, or webhook** — set up under **Notifications**. You can **acknowledge** an incident to show you're on it, or **resolve** it manually.

## Read a monitor's health

Each monitor shows a **7-day uptime bar** at a glance and, in detail, its uptime percentage and response-time percentiles (**P50, P90, P95, P99**). For HTTP monitors, the response-time chart breaks each check into its DNS, connection, TLS, and transfer phases, and every check in the events table expands into a timing waterfall with the response headers — so a slow endpoint is easy to diagnose.

## Frequently asked questions

<AccordionGroup>
  <Accordion title="Why didn't I get notified when a check failed?">
    A single failed check isn't an outage. tinyanalytics opens an **incident on the second consecutive failure** and notifies your channels then. The incident **resolves on the second consecutive success**, so one lucky check doesn't count as a recovery either.
  </Accordion>

  <Accordion title="Can tinyanalytics monitor something that isn't a website?">
    Yes. A **TCP** monitor checks that a host and port accept a connection, which covers databases, mail servers, and other non-HTTP endpoints. **HTTP / HTTPS** monitors request a URL and check the response, with optional authentication headers, a custom user agent, and a request body.
  </Accordion>

  <Accordion title="Can I treat a slow or wrong response as downtime?">
    Yes, for HTTP monitors. You can require the response to match allowed status codes, stay under a response-time threshold, stay within response-size bounds, contain or not contain a string in the body, or carry a specific header. If any rule fails, the check is recorded as a failure.
  </Accordion>

  <Accordion title="Where do uptime notifications get sent?">
    To the channels you set up under **Notifications** — **email, Slack, Discord, or webhook**. tinyanalytics notifies you when an incident opens and again when it resolves. You can **acknowledge** an incident to show you're on it, or **resolve** it manually.
  </Accordion>
</AccordionGroup>

## Related

<Columns cols={2}>
  <Card title="Alerts" icon="bell" href="/docs/analytics-alerts">
    Alert on traffic and conversion metrics, not just uptime.
  </Card>

  <Card title="Performance" icon="gauge-high" href="/docs/core-web-vitals-analytics">
    Measure Core Web Vitals for real visitors.
  </Card>

  <Card title="Scheduled reports" icon="envelope" href="/docs/scheduled-analytics-reports">
    Get a routine analytics digest by email.
  </Card>

  <Card title="How tinyanalytics works" icon="diagram-project" href="/docs/how-tinyanalytics-works">
    Where your analytics data comes from.
  </Card>
</Columns>


## Related topics

- [Analytics Read API](/docs/api-reference/analytics-read-api.md)
- [Analytics Alerts](/docs/analytics-alerts.md)
- [tinyanalytics API Reference](/docs/api-reference/tinyanalytics-api.md)
