hashicorp / hcdiag

hcdiag is a CLI utility that collects and bundles product and platform diagnostics. It supports Consul, Nomad, TFE, and Vault.
Mozilla Public License 2.0
56 stars 8 forks source link

Log file copy fails when capturing from a non-local Nomad server #80

Open davemay99 opened 2 years ago

davemay99 commented 2 years ago

When the environment variable NOMAD_ADDR points to a non-local IP address, hcdiag incorrectly attempts to read log files from the local filesystem.

Example output snippet:

$ hcdiag -nomad
...
2022-03-04T18:01:10.339-0500 [INFO]  hcdiag: Running seekers for: product=nomad
2022-03-04T18:01:10.340-0500 [INFO]  hcdiag: running: seeker="copy /var/log/nomad/nomad*.log"
2022-03-04T18:01:10.340-0500 [WARN]  hcdiag: result: seeker="copy /var/log/nomad/nomad*.log" result=%!s(<nil>) error="lstat /var/log/nomad/: no such file or directory"
...
aliciaclark1066 commented 2 years ago

Hi @davemay99, we've slated this work for Q4. We'll keep you in the loop!