Parameters for file log agents

We can define the following parameters for file log agents:

To capture events to a common file, set the log file ID to a suitable value in a fully optioned file configuration. Then, use the shorthand configuration variant to capture events from additional categories as shown:

Because of the default rules, this configuration is also equivalent to the following specification:

If you construct a configuration where the log ID value does not match any open log file, no events are captured. For example, the following configuration does not record any events because the configuration line that initializes the log file was commented out:

mode
Configure the mode parameter to open a file in either text or binary mode. For example:
[aznapi-configuration]
logcfg = audit.azn:file
...
mode={text|binary},
...

Text mode is deprecated on AIX, Linux, and Solaris operating systems. Binary mode on a Windows operating system writes the log file in an AIX®, Linux®, or Solaris-compatible format.

path
The path specifies the name and location of a log file. There is no default value, because the value of the log_id parameter takes precedence. An example for the WebSEAL audit trail file on AIX, Linux, and Solaris operating systems is as follows:

The directory portion of this path must exist. The log file is created if it does not exist.

queue_size
There is a delay between events being placed on the queue and the file log agent removing them. The queue_size parameter specifies the maximum size to which the queue is allowed to grow.
Consider that a new event is ready to be placed on the queue. Then, if the queue reaches the maximum size, the requesting thread is blocked until space is available in the queue. This process causes the performance of the event propagation thread to slow down to that of the file logging thread.

Limiting the queue size for the log agent must be configured with setting the queue size for the central event propagation queue. Unless the event propagation defined by the queue_size parameter is constrained appropriately, memory usage can still grow without bounds.

[aznapi-configuration]
logcfg = audit.azn:file
...
queue_size=number_events,
...
Default is 0. Specifying a value of 0 indicates that no limit is enforced on the growth of the unprocessed event queue. Correspondingly, the event propagation thread is not constrained by the speed of the logging thread. The unrecorded event queue can grow to an unmanageable size if:

  • You are using the default.
  • Events are being generated faster than they can be recorded to file.

rollover_size

Configure the rollover_size parameter to specify the maximum size to which a log file can grow. The default value is 2000000 bytes.

When the size of a log file reaches the specified rollover threshold, the existing file is backed up. The back-up happens to a file of the same name with the current date and time stamp appended. A new log file is then started. The possible rollover size values are interpreted as follows:

  • If the rollover_size value is less than zero, a new log file is created:

    • With each invocation of the process, and
    • Every 24 hours since that instance.

  • If the rollover_size value is equal to zero, the log file grows until it reaches 2 GB and then rolls over. If a log file exists at startup, new data is appended to it.

  • If the rollover_size value is greater than zero, the log file grows until it reaches the lesser of the following values and then rolls over:

    • The specified value
    • 2 GB

    If a log file exists at startup, new data is appended to it.

max_rollover_files

Configure the max_rollover_files parameter to specify the maximum number of rollover files to be kept on disk.

When the number of rollover log files reaches the specified threshold, the oldest log file is deleted.

The value of this configuration parameter is interpreted as follows:

  • If the max_rollover_files value is blank or not specified, then no rollover files are deleted.

  • If the max_rollover_files value is equal to zero, then only the current log file is kept, and all rollover log files are deleted.

  • If the max_rollover_files value is greater than zero, then only that number of rollover log files are kept. When the number of rollover log files exceeds max_rollover_files, the oldest log file is deleted.

Parent topic: Configure file log agents