According to the docs (here and here) it should be possible to configure Nomad to output agent logs and audit logs to a specific file. This seems to be slightly broken as I only ever see logs being generated with a -{timestamp}.log suffix ?
It does respect the file name (see the examples below) ... but it always adds the -{timestamp}.log suffix even though this should, according to the docs, only happen upon file rotation.
Nomad version is v1.1.2+ent.
Configuration of the ordinary agent logs in nomad.hcl 👇
# log settings
...
log_file = "/var/log/nomad.log"
...
Configuration of the Enterprise audit logs in nomad.hcl 👇
sink "audit" {
...
path = "/var/log/nomad_audit.log"
...
}
The result of this config ...
root@xxx:/var/log# ls -alh /var/log/nomad*
-rw-r----- 1 root root 8.3K Aug 18 11:22 /var/log/nomad-1629283904922740456.log
-rw-r----- 1 root root 7.7K Aug 18 11:22 /var/log/nomad-1629285757963036138.log
-rw------- 1 root root 2.1M Aug 18 11:22 /var/log/nomad_audit-1629283907665719584.log
-rw------- 1 root root 1.1M Aug 18 11:42 /var/log/nomad_audit-1629285759194447584.log
Likewise, trying to change the file permissions for the audit log file (per these instructions) does not seem to work as the files are always created with 0600 - I am not sure if the 2 issues are related but I thought I might as well mention it here.
According to the docs (here and here) it should be possible to configure Nomad to output agent logs and audit logs to a specific file. This seems to be slightly broken as I only ever see logs being generated with a
-{timestamp}.logsuffix ?It does respect the file name (see the examples below) ... but it always adds the
-{timestamp}.logsuffix even though this should, according to the docs, only happen upon file rotation.Nomad version is
v1.1.2+ent.Configuration of the ordinary agent logs in nomad.hcl 👇
Configuration of the Enterprise audit logs in nomad.hcl 👇
The result of this config ...
Likewise, trying to change the file permissions for the audit log file (per these instructions) does not seem to work as the files are always created with
0600- I am not sure if the 2 issues are related but I thought I might as well mention it here.