Add historical journald and log export flags to operator debug command (#26410)

* Add -log-file-export and -log-lookback commands to add historical log to
debug capture
* use monitor.PrepFile() helper for other historical log tests
This commit is contained in:
tehut
2025-08-04 13:55:25 -07:00
committed by GitHub
parent 7c633f8109
commit 21841d3067
9 changed files with 259 additions and 48 deletions

View File

@@ -54,6 +54,19 @@ true.
- `-log-include-location`: Include file and line information in each log line
monitored. The default is `true`.
- `log-file-export`: Include agents' Nomad logfiles in the debug capture.
The historical log export monitor runs concurrently with the log monitor
and ignores the `-log-level` and `-log-include-location` flags used to
configure that monitor. Nomad will return an error if the agent does not
have file logging configured. Cannot be used with `-log-lookback`.
- `log-lookback`: Include historical journald logs in the debug capture. The
journald export monitor runs concurrently with the log monitor and ignores
the `-log-level` and `-log-include-location` flags passed to that monitor.
This flag is only available on Linux systems using systemd, see the
`-log-file-export` flag to retrieve historical logs from non-Linux systems,
or those without systemd. Cannot be used with `-log-file-export`.
- `-max-nodes=<count>`: Cap the maximum number of client nodes included
in the capture. Defaults to 10, set to 0 for unlimited.