Free Hosting Online for WorkStations

< Previous | Contents | Next >

1.5. Logging


Activity logging for slapd is indispensible when implementing an OpenLDAP-based solution yet it must be manually enabled after software installation. Otherwise, only rudimentary messages will appear in the logs. Logging, like any other slapd configuration, is enabled via the slapd-config database.

OpenLDAP comes with multiple logging subsystems (levels) with each one containing the lower one (additive). A good level to try is stats. The slapd-config3 man page has more to say on the different subsystems.


Create the file logging.ldif with the following contents:


dn: cn=config changetype: modify replace: olcLogLevel olcLogLevel: stats

Implement the change:


sudo ldapmodify -Q -Y EXTERNAL -H ldapi:/// -f logging.ldif


This will produce a significant amount of logging and you will want to throttle back to a less verbose level once your system is in production. While in this verbose mode your host's syslog engine (rsyslog) may have a hard time keeping up and may drop messages:


rsyslogd-2177: imuxsock lost 228 messages from pid 2547 due to rate-limiting


You may consider a change to rsyslog's configuration. In /etc/rsyslog.conf, put:


# Disable rate limiting

# (default is 200 messages in 5 seconds; below we make the 5 become 0)

$SystemLogRateLimitInterval 0


And then restart the rsyslog daemon:


sudo systemctl restart syslog.service


Top OS Cloud Computing at OnWorks: