Type: log_file | Runner: Agent only
Reads the tail of a log file on the monitored host, verifies it was written recently, and checks for the presence of a required pattern. Combines freshness check and content check in one step.
max_age_minutes| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
log_path |
text | Yes | — | Absolute path to the log file on the host (e.g. /var/log/backup.log) |
pattern |
text | Yes | — | Plain text substring or PHP regex (e.g. /status=OK.*duration=\d+s/) that must appear in the log. A pattern enclosed in / delimiters is treated as a regex; anything else is a plain substring match. |
max_age_minutes |
duration | No | 1440 |
Fail if the file was not modified within this time. Default: 1 day (1440 minutes). |
| Status | Condition |
|---|---|
| OK | File exists, is fresh enough, and pattern is found |
| Fail | Log file does not exist |
| Fail | Log file is older than max_age_minutes |
| Fail | Pattern not found in the log |
| Unknown | Pattern is an invalid regex |
| Unknown | No path or pattern configured |
The freshness check runs first — if the file is stale, the pattern check is skipped.
The agent must mount the host filesystem and set HOST_ROOT:
agent:
environment:
HOST_ROOT: /host/root
volumes:
- /:/host/root:ro
Backup completed # Plain text — matches any line containing this string
SUCCESS # Keyword from a completion message
/status=OK/ # Simple regex — matches status=OK anywhere
/Backup completed in \d+s/ # Regex with digit class
/^2026-.*FATAL/ # Regex — fail if any FATAL line exists today
Backup completed successfullySUCCESS within the last 25 hoursmtime — it reflects when the file was last written, not when it was last read.