Hadoop Security Guide
Also available as:
PDF
loading table of contents...

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 $gateway /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:

    Setting

    Description

    yyyy-MM

    Rollover at the beginning of each month

    yyyy-ww

    Rollover 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:

    cd $gateway bin/gateway.sh stop bin/gateway.sh start