banshee est en développement actif : les collecteurs vont encore changer, et une version que vous publiez demandera sans doute des ajustements. Pour un usage stable, attendez la version 1.0.0.

Web

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.

  • web
  • http
  • https
  • page
  • redirect
  • check_http

par banshee1 installation2 versions

v2Dernière

Publiée le 28 octobre 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:

  1. the status code of the last answer read (200, 301, 503…);
  2. the response time, in milliseconds, of all the requests made, redirections included;
  3. the size of the body, in characters;
  4. the final address: the last page read, or, when the last answer is a redirection not followed, the address it points to;
  5. the number of redirections followed.
  • Redirections: the HTTP function of the collectors follows none. The collector reads the location of a redirection (3xx) itself and follows it while three conditions hold: the number set in web:redirects is not reached, the address stays on the same host (http:// to https:// 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:user and protocol:http:password, or protocol:http:token, set on the host or one of its folders. They go to https:// only: a secret toward http:// stops the collector as misconfigured.

Variables

NameLabelSaysDefault
web:urlPage addressthe full address, http:// or https://, https://www.example/health—
web:hostSite namesent 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:redirectsRedirections followedhow many redirections are followed, on the same host only; 0: none0

Outputs

NameLabelUnitPer instance
statusStatus code—no
response-timeResponse timemsno
sizePage sizecharactersno
final-urlFinal address—no
redirectsRedirections followed—no

Watches

NameTitleKindDefaultsChecked by default
unexpected-responseUnexpected responseexpected value, on statuscritical when the code is anything but 200yes
expected-textExpected text missingjudged by the collectorcritical when the page does not hold the text set; no text by defaultno
unwanted-textUnwanted text presentjudged by the collectorcritical when the page holds the text set; no text by defaultno
unexpected-redirectUnexpected redirectionexpected value, on final-urlno address given: it raises nothing until an address is set on the probeno
slowSlow pageabove a threshold, on response-timewarning above 1000 ms, critical above 3000 ms, for 3 runsyes
too-smallPage too smallbelow a threshold, on sizecritical below 1 character: an empty pageyes
expected-headerExpected header missingjudged by the collectorcritical when the header set is missing, or does not hold the value set; no header by defaultno
slow-unusualUnusual response timeoff its habit, on response-timenormal sensitivity, never under 500 msno

"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 GET is 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.