Skip to content

feat(http-last-modified): new plugin for document freshness via Last-Modified #1101

@markuslf

Description

@markuslf

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions