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

# HTTP Monitors

> Monitor web endpoints, APIs, and health checks with DevHelm HTTP monitors

HTTP monitors check web endpoints by making HTTP requests and evaluating the response against your assertions. They're the most feature-rich monitor type, supporting custom headers, request bodies, TLS verification, authentication, and 11 assertion types.

<Tip>
  **Define this in code.** Manage HTTP monitors in your monitoring-as-code workflow:
  [YAML format](/mac/yaml/monitors) · [Terraform](/mac/terraform/monitors) · [CI/CD patterns](/mac/ci-cd/overview)
</Tip>

## When to use HTTP monitors

* **Health check endpoints** — verify `/health` or `/status` returns 200
* **API availability** — check that key API endpoints respond within latency budgets
* **Website uptime** — confirm marketing pages, app frontends, and landing pages load
* **SSL certificate expiry** — get alerts before certificates expire using the `ssl_expiry` assertion
* **Content validation** — verify response bodies contain expected data using `body_contains`, `json_path`, or `regex`
* **Redirect chains** — track redirect behavior with `redirect_count` and `redirect_target` assertions

## How it works

1. DevHelm sends an HTTP request from each configured probe region at the set frequency
2. The response is evaluated against all configured assertions
3. Each assertion records pass/fail with the configured severity (`fail` or `warn`)
4. If any `fail`-severity assertion fails, the check is marked as failed
5. Failed checks flow into the incident policy engine

## Supported methods

| Method   | Typical use                                        |
| -------- | -------------------------------------------------- |
| `GET`    | Health checks, page monitoring, API reads          |
| `POST`   | API endpoint testing with request bodies           |
| `PUT`    | API update endpoint testing                        |
| `PATCH`  | Partial update endpoint testing                    |
| `DELETE` | Deletion endpoint testing                          |
| `HEAD`   | Lightweight availability checks (no response body) |

## Quick example

<CodeGroup>
  ```bash CLI theme={null}
  devhelm monitors create \
    --name "API Health" \
    --type HTTP \
    --url https://api.example.com/health \
    --method GET \
    --frequency 60 \
    --regions us-east,eu-west
  ```

  ```yaml devhelm.yml theme={null}
  monitors:
    - name: API Health
      type: HTTP
      config:
        url: https://api.example.com/health
        method: GET
      frequencySeconds: 60
      regions: [us-east, eu-west]
      assertions:
        - config:
            type: status_code
            expected: "200"
            operator: equals
          severity: fail
        - config:
            type: response_time
            thresholdMs: 2000
          severity: fail
  ```

  ```typescript TypeScript theme={null}
  const monitor = await client.monitors.create({
    name: "API Health",
    type: "HTTP",
    config: {
      url: "https://api.example.com/health",
      method: "GET",
    },
    frequencySeconds: 60,
    regions: ["us-east", "eu-west"],
  });
  ```

  ```python Python theme={null}
  monitor = client.monitors.create({
      "name": "API Health",
      "type": "HTTP",
      "config": {
          "url": "https://api.example.com/health",
          "method": "GET",
      },
      "frequencySeconds": 60,
      "regions": ["us-east", "eu-west"],
  })
  ```
</CodeGroup>

## Next steps

<CardGroup cols={2}>
  <Card title="Configuration" icon="gear" href="/monitoring/http/configuration">
    Every HTTP monitor field — URL, method, headers, body, TLS, auth.
  </Card>

  <Card title="Assertions" icon="check" href="/monitoring/http/assertions">
    All 11 HTTP assertion types with examples.
  </Card>

  <Card title="First HTTP monitor" icon="rocket" href="/guides/first-http-monitor">
    Step-by-step tutorial.
  </Card>

  <Card title="SSL monitoring" icon="lock" href="/guides/ssl-certificate-monitoring">
    Monitor certificate expiration dates.
  </Card>
</CardGroup>
