Type: file_size | Runner: Agent only
Checks that a file exists and its size is within a configured range. Useful for detecting 0-byte backup output or runaway log files.
min_bytes (when configured)max_bytes (when configured)Both constraints are optional. Configure only the ones relevant to your use case.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
path |
text | Yes | — | Absolute path to the file to monitor |
min_bytes |
number | No | 0 |
Fail if the file is smaller than this. Set to 1 to detect empty (0-byte) files. Disabled when 0. |
max_bytes |
number | No | 0 |
Fail if the file exceeds this size. Useful to detect runaway log files. Disabled when 0. |
| Status | Condition |
|---|---|
| OK | File exists and all configured size constraints are met |
| Fail | File does not exist |
| Fail | File size < min_bytes (when min_bytes > 0) |
| Fail | File size > max_bytes (when max_bytes > 0) |
| Unknown | Cannot read the file size |
| Unknown | Invalid config (min_bytes > max_bytes when both are set > 0) |
| Unknown | No path configured |
The message reports the actual file size in bytes (e.g. 4294967296 bytes).
The agent must mount the host filesystem and set HOST_ROOT:
agent:
environment:
HOST_ROOT: /host/root
volumes:
- /:/host/root:ro
| Scenario | Config |
|---|---|
| Detect empty backup output | min_bytes: 1 |
| Verify minimum backup size | min_bytes: 1048576 (1 MB minimum) |
| Detect runaway log file | max_bytes: 104857600 (100 MB maximum) |
| Both bounds | min_bytes: 1024, max_bytes: 10737418240 |
Combine with File Age for complete backup verification: File Age confirms the file was written recently, File Size confirms it is not empty or truncated.