http
Use case
The core availability check: fetch a URL, verify the status code and
optionally a response pattern - what most of app_cmt’s status dashboard is
built on.
Configuration
| Field | Type | Meaning |
|---|---|---|
url |
string | required; URL to fetch (GET) |
http_code |
int | expected HTTP status code; default 200 |
pattern |
string | optional; regex that must match somewhere in the response headers or body (!-prefixed = reject pattern, must NOT match) |
timeout |
duration | optional; overrides global.timeout for this check |
host |
string | optional; Host header to send (virtual-host probing) |
allow_redirects |
bool | follow HTTP redirects; default false |
ssl_skipverify |
bool | optional; overrides global.ssl_skipverify for this check |
username / password |
string | optional; HTTP basic auth |
http_proxy |
string | optional; proxy URL for this check, or noenv to ignore HTTP_PROXY/HTTPS_PROXY; default: use environment proxy settings |
obfuscate_url |
string | param (default) | full | no - how much of the URL to hide in reported output (the request itself always uses the real URL) |
Output
| Item | Type | Meaning |
|---|---|---|
url |
string | checked URL, obfuscated per obfuscate_url (tag) |
http_msec |
int (ms) | request duration |
http_code |
int | HTTP status code returned |
Example
checks:
- module: http
name: www_cavaliba
conf:
url: https://www.cavaliba.com/
http_code: 200
pattern: cavaliba