HTTP(S) with content check (http_content)
Requests a page, follows a bounded number of redirects, and checks the final status against the set you expect and the body against text or regular expressions it must or must not contain. Over HTTPS it also reports how long the device's certificate remains valid. It sits beside http_status, which only looks at the status and is cheaper.
What it looks like

The sensor's page after a few polls, watching a web target the test run starts on this machine. In the dark theme: the sensor's page. The form for adding it, with its parameters filled in: light, dark.
Channels
| Key | Name | Unit | Default limits |
|---|---|---|---|
status_code | Status code | none | none |
response_ms | Response time | ms | warning above 2000, error above 10000 |
body_bytes | Body size | B | none |
content_match | Content check | none | Down when 0. Only reported when a content check is set. |
cert_days_remaining | Days until the certificate expires | days | warning below 21, error below 7; only over HTTPS |
chain_days_remaining | Days until the earliest expiry in the chain | days | warning below 21, error below 7; only over HTTPS |
response_ms adds up the time of every request in a redirect chain. body_bytes is the size the server sent, even when only the first part was searched. The certificate channels work as for http_status; see certificate expiry. They come from the first request, the one aimed at the device, and are absent over plain HTTP or with check_certificate off.
Parameters
| Parameter | Default | Meaning |
|---|---|---|
scheme | https | http or https. |
port | 80 or 443 | TCP port. |
path | / | Path and query, starting with /, without spaces or control characters. |
method | GET | GET, HEAD or POST. A content check needs a body, so it cannot be combined with HEAD. |
json_body | none | Sent as the body of a POST, with Content-Type: application/json. Valid JSON, at most 64 KiB. |
headers | none | Extra request headers as {"name": ..., "value": ...}, at most 16. Not for credentials, see below. |
auth | none | How the secret credential is sent: {"type": "bearer"}, {"type": "basic"} (the secret is user:password) or {"type": "header", "name": "X-Token", "prefix": "Key "}. |
expected_status | ["200-299"] | Codes that count as healthy: 204, 2xx or 200-299. |
max_redirects | 5 | 0 to 10. |
verify_tls | true | Check the server certificate. |
tls_fingerprint | none | Trust exactly the certificate with this SHA-256 fingerprint (colon-separated or plain hex, either case) and no other (on a redirect to another host the pin is not used there), whatever its chain, dates or name say; verify_tls is then not needed. See pinning a certificate. |
must_contain | none | The body must contain this text. |
must_not_contain | none | The body must not contain this text. |
must_match | none | The body must match this regular expression (Rust syntax; no look-around or back-references). |
must_not_match | none | The body must not match this regular expression. |
max_body_bytes | 1048576 | How much of the body is read and searched, 1 to 10485760. When the body is longer, the message says only the first part was searched. |
check_certificate | true | With https, also report cert_days_remaining and chain_days_remaining. Turn it off when a tls_cert sensor already watches the same certificate. Ignored with http. |
Suggested interval: 60 seconds. Credential: a secret, only when auth is set.
Secrets never travel in parameters
Parameters are stored and shown in clear. The sensor therefore refuses a header in headers that looks like a credential (Authorization, Cookie, X-Api-Key, anything with token, secret or password in its name) and says to use auth. Create a credential of kind secret in the vault and assign it to the sensor, its device or a group above it. The value is sent in the request, never written to a message, a log or a payload. When a redirect leads to another host, the secret is not sent there.
On the target
A web server reachable from the probe host. For HTTPS with verify_tls on, a certificate that the probe host trusts and that matches the device's host name.
Failures
| Message | Meaning |
|---|---|
HTTP N is not in the expected set [...] | Down. A successful poll with an unexpected status. |
the body does not contain "...", the body contains "...", which it must not, the body does not match /.../, the body matches /.../, which it must not | Down. The content check failed. |
cannot connect: ... (kind unreachable), no final response within N ms (kind timeout), TLS error: ... (kind protocol) | As for http_status. |
this sensor needs a secret credential ... (kind config) | auth is set and no secret is assigned or inherited. |
certificate for ... expired N days ago and the other certificate messages | As for http_status: Down, with verify_tls off or a pin. |