Troubleshoot audit log configuration
You can use the following steps to troubleshoot MicroShift custom audit log settings and file locations.
Procedure
-
Check the current values that are configured by running the following command:
$ sudo microshift show-config --mode effectiveExample outputauditLog: maxFileSize: 200 maxFiles: 1 maxFileAge: 7 profile: AllRequestBodies -
Check the
audit.logfile permissions by running the following command:$ sudo ls -ltrh /var/log/kube-apiserver/audit.logExample output-rw-------. 1 root root 46M Mar 12 09:52 /var/log/kube-apiserver/audit.log -
List the contents of the current log directory by running the following command:
$ sudo ls -ltrh /var/log/kube-apiserver/Example outputtotal 6.0M -rw-------. 1 root root 2.0M Mar 12 10:56 audit-2024-03-12T14-56-16.267.log -rw-------. 1 root root 2.0M Mar 12 10:56 audit-2024-03-12T14-56-49.444.log -rw-------. 1 root root 962K Mar 12 10:57 audit.log