Context
CONTRIBUTING's "one tool, one task" rule keeps document-freshness alerts out
of the http availability plugin. Document age has its own threshold
semantic ("warn if older than 24h") and its own check cadence (typically
slower than availability), so it lives in its own plugin.
Scope
Plugin http-last-modified. Issues an HTTP HEAD (configurable to GET)
and parses the Last-Modified response header.
Parameters:
--always-ok, --insecure, --no-proxy, --timeout
--url, --header (append), --user-agent,
--method HEAD|GET (default HEAD)
--warning, --critical: Nagios ranges over the document age in seconds.
Values accept compound human-duration syntax (e.g. 3d7s, 1d:7d),
parsed via lib.human.humanrange2seconds.
Output: short summary with the parsed Last-Modified value and the age in
human form (lib.human.seconds2human()).
States:
- UNKNOWN if
Last-Modified is missing or unparseable.
- WARN/CRIT per the range thresholds.
Perfdata: age (seconds), time (request time).
Out of scope
Expires, Cache-Control: max-age, Age and ETag-based freshness. If
demand emerges, ship sibling plugins (http-expires, http-age).
Dependencies
Linuxfabrik/lib#137 only if HTTP/2 or HTTP/3 endpoints are required.
HTTP/1.1 default works without the extension.
Reference
example plugin for structure.
Classification
New plugin. Enhancement.
Context
CONTRIBUTING's "one tool, one task" rule keeps document-freshness alerts out
of the
httpavailability plugin. Document age has its own thresholdsemantic ("warn if older than 24h") and its own check cadence (typically
slower than availability), so it lives in its own plugin.
Scope
Plugin
http-last-modified. Issues an HTTPHEAD(configurable toGET)and parses the
Last-Modifiedresponse header.Parameters:
--always-ok,--insecure,--no-proxy,--timeout--url,--header(append),--user-agent,--method HEAD|GET(defaultHEAD)--warning,--critical: Nagios ranges over the document age in seconds.Values accept compound human-duration syntax (e.g.
3d7s,1d:7d),parsed via
lib.human.humanrange2seconds.Output: short summary with the parsed
Last-Modifiedvalue and the age inhuman form (
lib.human.seconds2human()).States:
Last-Modifiedis missing or unparseable.Perfdata:
age(seconds),time(request time).Out of scope
Expires,Cache-Control: max-age,Ageand ETag-based freshness. Ifdemand emerges, ship sibling plugins (
http-expires,http-age).Dependencies
Linuxfabrik/lib#137only if HTTP/2 or HTTP/3 endpoints are required.HTTP/1.1 default works without the extension.
Reference
exampleplugin for structure.Classification
New plugin. Enhancement.