HP-UX Directory Server Administrator Guide HP-UX Directory Server Version 8.1 (5900-3098, May 2013)

3. To enable audit logging, select the Enable Logging checkbox.
To disable audit logging, clear the checkbox. By default, audit logging is disabled.
4. Enter the full path and file name for the directory to use for the audit log in the field provided.
The default path is /var/opt/dirsrv/slapd-instance_name/log/audit.
5. Set the maximum number of logs, log size, and time period when the file is archived.
For information on these parameters, see “Defining a log file rotation policy” (page 508).
6. Set the maximum size of combined archived logs, minimum amount of free disk space, and
maximum age for a log file.
For information on these parameters, see “Defining a log file deletion policy” (page 509).
7. Click Save.
14.2 Manual log file rotation
The Directory Server supports automatic log file rotation for all three logs. However, it is possible
to rotate log files manually if there are not automatic log file creation or deletion policies configured.
By default, access, error, and audit log files can be found in the following location:
/var/opt/dirsrv/slapd-instance_name/log
To rotate log files manually:
1. Shut down the server.
/opt/dirsrv/slapd-instance_name/stop-slapd
2. Move or rename the log file being rotated so that the old log file is available for future
reference.
3. Start the server.
/opt/dirsrv/slapd-instance_name/start-slapd
14.3 Named Pipe Log Script
The named pipe log script allows you to replace a log file with a named pipe attached to a script.
The server can then send the log output to a script instead to a log file. The named pipe log script
has the following characteristics:
Logs only certain events. For example, failed binds, connections from certain IP addresses
and so on.
Logs only lines that match a certain pattern.
Logs only the last N lines that are useful for enabling full error log debug levels in production
environments.
Sends an E-mail or other notification when a certain event is detected.
The script is written in python, and allows plug-ins. The script will log the last N lines and the default
value is 1000. The following are two plug-ins provided:
Plug-in to log only failed bind attempts.
Plug-in that will log only lines that match given regular expressions.
Usage of the script is as follows:
/opt/dirsrv/bin/ds-logpipe.py <name of pipe file to create or use> [options]
The file name of the named pipe must be supplied. The script will create the file, if it does not
exists. If the file exists and is a pipe, the script will use it. If the file exists and is not a pipe, the
script will abort.
Options:
-u|--user - The owner of the named pipe. It is also applicable for files created by plug-ins.
-m|--maxlines - number of lines to keep in the circular buffer and the default value is 1000.
14.2 Manual log file rotation 513