Previous Contents Index Next |
iPlanet Directory Access Router Administrator's Guide |
Chapter 10 Configuring and Monitoring Logs
This chapter explains how to configure iPlanet Directory Access Router (iDAR) to log entries or messages and then monitor its activities with the help of the logged entries using the iDAR Server Console.The chapter has the following sections:
Overview of Logging
Overview of Logging
iDAR can maintain two types of logs:
System Log
The sections that follow explain both in detail.
System Log
iDAR can maintain extensive log records of various events and system errors so that you can monitor and debug the system. All log records can be maintained in text files and can be stored in your local file system for quick and easy retrieval. By default, iDAR writes log entries to this file:<server-root>/idar-<hostname>/logs/fwd.log
Each message in the log file is time stamped. It also has the process number and a message number that is internal to iDAR.
For identification and filtering purposes, events logged by iDAR are classified into various categories. These are listed in Table 10-1. Each category represents messages that are of the same or a similar nature or that belong to a specific functional area. Based on the configuration, a log file can record entries that fall under one or more of these categories.
In the iDAR configuration, each message category corresponds to a specific log level. Log levels indicate the level of logging to be performed by the serverthat is, how detailed the logging should be.
A higher priority level means less detail because only events of high priority are logged.
Table 10-1 lists the message categories in the descending order of priorityCritical has the highest priority level and Detailed trace has the lowest priority level.A lower priority level means greater detail because more kinds of events are recorded in the log file.
iDAR enables you to specify the amount of loggingyou can use log levels to filter log entries based on the severity of an event. By default, the level is set to Warning.
Optionally, on platforms other than Windows NT, you can configure iDAR to send log messages to the syslog daemon instead of a file; you cannot send the log messages to both a file and to the syslog daemon at the same time. If you opt for this configuration, make sure that your syslogd is properly configured. For example, to have all the messages written to a particular file /var/adm/messages the following line must be added to the file /etc/syslog.conf:
daemon.crit;daemon.warning;daemon.info;daemon.debug /var/adm/messages
Note that iDAR uses the daemon facility, with the crit, warning, info, and debug priorities or log levels. Table 10-1 shows the mapping between syslog events and iDAR events.
Table 10-2    Mapping of Log Levels
iDAR Event
syslog Event
iDAR does not rotate logs. You need to do this manually and it will usually require a restart. If you can afford to lose a few messages, on the UNIX platforms, you can rotate logs with the following sequence of commands.
cp fwd.log /logvol/fwd.log.old
cp /dev/null fwd.logBy default, iDAR does not delete any of the log files automatically. Because the log files are saved in your local file system, these files eventually take up a considerable amount of disk space. You can avoid this problem by manually deleting the log files from the local file system. If you want to keep specific log files for future use, be sure to archive or back them up.
Audit Log
In addition to logging system and error messages, iDAR can also maintain audit trails for all events and connection statisticsfor example, the DN of a client that just completed a bind/unbind with an LDAP directory can be logged.By default, iDAR is not configured to log audit messages. You can enable this feature at any time. You can also specify whether to log audit messages to the same file to which system log entries are written or to an alternate file. Unless configured to write to a different file, the audit messages (along with the other log messages) are logged to the same file to which system log entries are written; for details, see System Log.
Configuring Logs
To configure iDAR to log entries, follow these steps:
Step 1. Define a Logging Property
Step 1. Define a Logging Property
This step is required only if you want to create or define an object for the Log Property. If you have already created objects for the log property and want to use one of them, then skip to the next step.
Access the iDAR Configuration Editor Console; see Accessing the iDAR Consoles.
In the navigation tree, expand the Properties node, and then select Logging.
Click New to define a new object.
In the Name field, type a name for the object. The name must be a unique alphanumeric string.
In the Statistics tab, specify the kind of information to be logged.
Select the Output tab and specify where log entries should be sent and whether to log audit traces.
- Check the boxes referring to the type of logging messages desired. By default none of the options are selected. Log messages are classified into the following groups: directory modifications, all LDAP operations, network connections, number of clients connected, and client auditing information.
- Directory modifications. Statistics about operations that write to the directory, like add, modify, and delete will be logged.
- All LDAP operations. Statistics about all LDAP operations will be logged.
- Network connections. Statistics about network connections will be logged.
- Number of clients connected. General statistics such as how many clients are connected will be logged.
- Client auditing information. Audit information such as the DN of client that just completed a bind/unbind will be logged.
Select the Level tab and specify the log levelthe amount of logging detail desired.
- Log file. Displays options governing where iDAR will write its log entries.
- Write log entries to $(IDAR_ROOT)/logs/fwd.log. This is the default setting in which iDAR will write its log entries to the file $(IDAR_ROOT)/logs/fwd.log where $(IDAR_ROOT) is the directory under the server root where iDAR is installed, typically /usr/iplanet/servers/idar-<hostname> or \Program\Files\iPlanet\Servers\idar-<hostname>.
- Write log entries to. Specify an alternative file to which iDAR will direct its log entries. The file separator must follow UNIX conventions regardless of platform.
- Write logs to syslog daemon with facility. (UNIX only) Choose a syslog facility code that iDAR will use to log entries. This setting should only be chosen if this log property is to be used by iDAR server installed on a UNIX machine. Specifying this option for iDAR installed on a Windows NT system will make it inoperable. It is recommended that if you would like to specify values for this attribute, you should create separate log properties for Windows NT and UNIX.
- Audit File. Displays options governing where iDAR will write its audit log entries. For this feature to work, audit logging must be enabled by selecting the "Client auditing information" option in the Statistics tab.
- Write audit entries with other log entries. This is the default setting in which iDAR will write its audit log entries to the same output specified in the log file settings above.
- Write log entries to. Specify an alternative file to which iDAR will direct its audit log entries. The file separator should follow UNIX conventions regardless of platform.
- Write audits to syslog daemon with facility. (UNIX only) Choose a syslog facility code that iDAR will use to log audit entries. This setting should only be chosen if this log property is to be used by iDAR servers hosted on a UNIX machine. Specifying this option causes a Windows NT based iDAR to become inoperable. It is recommended that if you would like to specify values for this attribute, you should create separate Log Property objects for Windows NT and UNIX.
Click Save to save your changes.
Restart the server; see Restarting iDAR.
- The name of the object now appears in the list. The iDAR configuration is modified, and you're prompted to restart the server.
Step 2. Specify the Logging Property to Use
In this step, you select an existing log property to be used for logging messages.
Access the iDAR Server Console; see Accessing the iDAR Consoles.
Select the Configuration tab, and then, in the navigation tree, select Logs.
In the "Log property name" drop-down list, select the property you want to use.
- The right pane shows information regarding the log property specified by the current system property.
Click Save to save your changes.
- To verify that you're using the correct property, click Edit and take a look at the configuration. If required, you can make any configuration changes.
Select the Tasks tab and restart the server; see Restarting iDAR.
- iDAR is now configured to log messages as defined in the configuration. The iDAR configuration is modified, and you are prompted to restart the server.
Monitoring Logs From iDAR Server Console
Once you've configured iDAR to log messages (see Configuring Logs), you can monitor its activities by viewing the log messages. For example, when you have problems with iDAR that require troubleshooting, you may find it helpful to check the error or informational messages that the server has logged. Also, by examining the log files you can monitor many aspects of iDAR's operation.To facilitate this, the iDAR Server Console provides a simple mechanism for viewing the contents of log files. The contents of the log file you choose to view are displayed in the form of a table. The table is split; the top pane shows log records in tabular format and the bottom pane shows the currently-selected record in detail. Each log record contains information such as the date and time the message was logged, the severity of the message, and a general description of the log.
Once you open a log file for viewing, you can read its contents partially by specifying the number of records or entries to be displayed. The instructions below explain how to view log records in a file:
Access the iDAR Server Console; see Accessing the iDAR Consoles.
Select the Configuration tab, and then, in the navigation tree, expand Logs.
- The right pane shows viewing options for entries logged to a file. You can select any of the log files specified in the current log property; iDAR can contain separate files for logging and auditing information, if configured to do so.
- Description of the form elements are as follows:
- Refresh. Reads the log and displays the records in the table below.
- Continuous. Select this setting to have this view continuously refreshed with the most current log records.
- Log file. Displays the name of the file currently being viewed.
- Lines to show. Specifies the maximum number of lines to read from the log file.
Previous Contents Index Next
Copyright © 2001 Sun Microsystems, Inc. Some preexisting portions Copyright © 2001 Netscape Communications Corp. All rights reserved.
Last Updated July 26, 2001