logwatch
Tail a local file for a pattern. Counts matches, notices rotation, and never sends a line off the box.
privileged Add logwatch to agent.enable_addons, and give the addons user read access to the file.
Parameters
| Parameter | Default | Meaning |
|---|---|---|
pathREQUIRED | ||
patternREQUIRED | RE2. | |
warn_at | 1 | Matches per run at or above this are degraded. |
down_at | 0 | Matches at or above this are down. 0 means never. Wins over warn_at. |
max_bytes | 4 MiB | Most read per run; the rest is reported as skipped_bytes. |
initial_tail | 256 KiB | How far back to read on first run. |
A missing file is down. An unreadable one is a config error.
Measurements
matches, lines_scanned, bytes_scanned, skipped_bytes, last_write_age_s, rotated, cold_start.