The check compares a file's modification time with the current time. That suits, for example, a timestamp file that a backup script touches after success.
| Property | Value |
|---|---|
| Type identifier | file_age |
| Runner | Agent |
| Target in the email | Path |
| Field | Key | Default | Meaning |
|---|---|---|---|
| File path | path |
Required. Absolute path of the file | |
| Max age | max_age_minutes |
1440 (1 day) |
FAIL if the file is older. Entered in days, hours and minutes |
| Warn age | warn_age_minutes |
0 (off) |
WARN if the file is older. Must be smaller than the max age, 0 disables the warning |
The path is prefixed with HOST_ROOT when the variable is set in the agent. The age is rounded to whole minutes.
| Situation | Status | Message |
|---|---|---|
| Younger than warn and max age | OK |
<n> min old |
| Older than the warn age | WARN |
File is <n> min old (warn: <w> min) |
| Older than the max age | FAIL |
File is <n> min old (max: <m> min) |
| File missing | FAIL |
File not found: <path> |
| Modification time is in the future | UNKNOWN |
File mtime is in the future (<n> min) |
| Modification time unreadable | UNKNOWN |
Cannot read mtime of <path> |
| No path | UNKNOWN |
No path configured |
The max age is tested first. If the warn age is not smaller than the max age, the warning never applies.