banshee/web-collection/web/https/
page
A web page the way check_http reads it: status code, response time, size, expected and unwanted text, expected header, redirections.
by banshee1 installation2 versions
v2Latest
Published on October 28, 2026. One naming convention across collections; documentation completed.
Web page
Checks a web page the way check_http does: its status code, its response time, its size, a text it must hold or must not hold, a header it must carry, and where its redirections lead. Eight watches are offered, each one set on the probe.
Versions
Generic: any web server, over http:// or https://, whatever its software.
How it works
One GET to the page address; nothing else is sent. The collector returns:
- the status code of the last answer read (
200,301,503…); - the response time, in milliseconds, of all the requests made, redirections included;
- the size of the body, in characters;
- the final address: the last page read, or, when the last answer is a redirection not followed, the address it points to;
- the number of redirections followed.
- Redirections: the HTTP function of the collectors follows none. The collector reads the
locationof a redirection (3xx) itself and follows it while three conditions hold: the number set inweb:redirectsis not reached, the address stays on the same host (http://tohttps://on the same host is followed), and the answer is a redirection with a location. A relative location (/login,login,//www.example/login) is completed from the page that sent it. A redirection to another host is never followed: its address is the final address, and "Unexpected redirection" watches it. - The texts are searched in the body of the last answer, as it arrives (HTML included), case included. Set them on the probe, in the setting of their watch: empty, the watch judges nothing.
- The header expected is searched among the headers of the last answer, its name in any case; with a value set, the header must hold it. The value found is never written in the message: a header may carry a cookie.
- An account or a token: a token goes as
Authorization: Bearer, and then no account is sent beside it; otherwise an account goes in Basic. Either is sent to the redirections followed too, which stay on the same host. https://follows the TLS profile of the probe: a certificate it refuses stops the collector as misconfigured, with its reason.- A site that refuses the connection, or does not answer in the delay of
protocol:http:timeout, is critical: "Site down". Any other failure (an unknown name, no route) leaves the probe unreachable.
The expiry of the certificate is not read here: deploy network/tls/certificate on the same host and port, which watches it, with its chain and the protocols the server accepts.
Prerequisites
- The address reachable from the poller.
- For a page behind an account or a token,
protocol:http:userandprotocol:http:password, orprotocol:http:token, set on the host or one of its folders. They go tohttps://only: a secret towardhttp://stops the collector as misconfigured.
Variables
| Name | Label | Says | Default |
|---|---|---|---|
web:url | Page address | the full address, http:// or https://, https://www.example/health | — |
web:host | Site name | sent as the Host header, for a site that a server hosts beside others and that is reached by an IP address; optional, the name in the address when empty | — |
web:redirects | Redirections followed | how many redirections are followed, on the same host only; 0: none | 0 |
Outputs
| Name | Label | Unit | Per instance |
|---|---|---|---|
status | Status code | — | no |
response-time | Response time | ms | no |
size | Page size | characters | no |
final-url | Final address | — | no |
redirects | Redirections followed | — | no |
Watches
| Name | Title | Kind | Defaults | Checked by default |
|---|---|---|---|---|
unexpected-response | Unexpected response | expected value, on status | critical when the code is anything but 200 | yes |
expected-text | Expected text missing | judged by the collector | critical when the page does not hold the text set; no text by default | no |
unwanted-text | Unwanted text present | judged by the collector | critical when the page holds the text set; no text by default | no |
unexpected-redirect | Unexpected redirection | expected value, on final-url | no address given: it raises nothing until an address is set on the probe | no |
slow | Slow page | above a threshold, on response-time | warning above 1000 ms, critical above 3000 ms, for 3 runs | yes |
too-small | Page too small | below a threshold, on size | critical below 1 character: an empty page | yes |
expected-header | Expected header missing | judged by the collector | critical when the header set is missing, or does not hold the value set; no header by default | no |
slow-unusual | Unusual response time | off its habit, on response-time | normal sensitivity, never under 500 ms | no |
"Unusual response time" needs the history of the measure: until the poller has learnt it, the watch says it is learning and raises nothing.
Choose an expected text that only a page in good health shows, for instance the name of a service on a health page; as unwanted text, a sentence of the maintenance page. A page that redirects on purpose (http:// to https://) is checked either by following it (web:redirects at 1 or more), or by expecting its code (301 in "Unexpected response") and its target in "Unexpected redirection".
Limits
- The size is counted in characters, not in bytes.
- A redirection to another host is not followed, even when it is expected: a site that moves to another domain is checked by a probe on that domain.
- Only
GETis sent: a page that needs a form posted first (a login) is not served. - The page is read as the server sends it: a page built by JavaScript in the browser shows here as its empty frame.