Type: file_age | Runner: Agent only
Monitors the modification time (mtime) of a file on the host. Fails if the file has not been written within the configured time window. The primary use case is backup health checks that write a sentinel file on successful completion.
max_age_minuteswarn_age_minutes| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
path |
text | Yes | — | Absolute path to the file to monitor (e.g. /var/backup/.last_success) |
max_age_minutes |
duration | No | 1440 |
Fail if the file has not been modified within this time. Default: 1 day. |
warn_age_minutes |
duration | No | 0 |
Warn if the file is older than this time. Must be less than max_age_minutes. Set to 0 to disable. |
| Status | Condition |
|---|---|
| OK | File exists and age is within all configured thresholds |
| Warn | File age > warn_age_minutes but <= max_age_minutes (only when warn_age_minutes > 0) |
| Fail | File age > max_age_minutes |
| Fail | File does not exist |
| Unknown | Cannot read the file's modification time |
| Unknown | File mtime is in the future (clock skew) |
| Unknown | No path configured |
The message always reports the actual file age (e.g. 347 min old).
The agent must mount the host filesystem and set HOST_ROOT:
agent:
environment:
HOST_ROOT: /host/root
volumes:
- /:/host/root:ro
Configure your backup script to touch a sentinel file on success:
# In your backup script
/usr/local/bin/backup.sh && touch /var/backup/.last_success
Then configure File Age with:
path: /var/backup/.last_successmax_age_minutes: 1500 (25 hours — gives a buffer for daily backups that run at varying times)warn_age_minutes: 1380 (23 hours — early warning before the fail threshold)Combine with File Size to also verify the backup output is not empty.