2. Change Roll Frequency of the Audit Log

Audit records are written to the log file /var/log/knox/gateway-audit.log and by default roll monthly. When the log rolls, the date that it rolled is appended to the end of the current log file and a new one is created.

To change the frequency:

  1. Open the /etc/knox/conf/gateway-log4j.properties file in a text editor.

  2. Change the log4j.appender.auditfile.DatePattern as follows:

    log4j.appender.auditfile.DatePattern = $interval

    Where $interval is one of the following:

     

    Table 9.1. Audit Log Settings: Roll Frequency

    SettingDescription
    '.'yyyy-MMRollover at the beginning of each month
    '.'yyyy-wwRollover at the first day of each week. The first day of the week depends on the locale.
    '.'yyyy-MM-dd Rollover at midnight each day.
    '.'yyyy-MM-dd-a Rollover at midnight and midday of each day.
    '.'yyyy-MM-dd-HH Rollover at the top of every hour.
    '.'yyyy-MM-dd-HH-mm Rollover at the beginning of every minute.

  3. Save the file.

  4. Restart the gateway:

    su -l knox -c '$gateway_home/bin/gateway.sh stop'
    su -l knox -c '$gateway_home/bin/gateway.sh start'


loading table of contents...