Previous     Contents     Index     Next     
iPlanet Portal Server Administration Guide



Chapter 10   Data Logging




Logging



Figure 10-1    Logging Servers: show log files

Any application in iPlanet Portal Server that uses the Logging API can create logs and maintain history log segments. The log files are stored by default in flat files in the directory /var/opt/SUNWips/logs, although another location can be specified through the admin console. The product can also be configured to log data to a database. The files can not be deleted manually because the log names are stored in the Profile database.

The log files are maintained by a dedicated log server. Since it operates on the same network as other iPlanet Portal Server components, log server performance may be affected by network traffic.


Manage Logging Profile

Clicking on the Logging link on the Admin Console menu causes the Manage Logging link to appear. Beneath the link is a link for each host. Selecting a host link calls up the Logging Servers: show log files page, as shown in Figure 10-1. From this page, logs can be viewed and deleted.



Note Only the Super Administrator can delete logs. A Domain Administrator can only view logs when permissions are set (default). The iwtgateway logs are not viewed by the Domain Administrator.



At the top of the page a logging active or in active status is noted for this particular server. If it is not active, that doesn't mean the log files for that server don't exist, only that logging is turned off. Logging can be turned on or off for a particular server by changing the ACTIVE/INACTIVE log status attribute from the Component Profile: Logging window within the Manage Logging Profile link, as shown in Figure 10-2.



Figure 10-2    Component Profile: Logging


Viewing a Log



Figure 10-3    iwtAuthentication Log

When a particular log file link is clicked, the contents of that file are displayed in a window. For instance, Figure 10-3, shows the current contents of the Authentication log file for a particular server. For this log file, the log information displayed includes:

  • Log date and time

  • Client domain from where the access to portal server has been made

  • Client login id (the userid specified to log in to the portal server)

  • Log type (type of log message, such as Auth for authentication)

  • Log message

One or all of the log files on a server can be deleted by clicking the checkbox next to the name of the log file and then clicking the Delete Selected Logs button.


Managing the Logging Profile

Clicking on the Manage Logging Profile link on the main Logging window lets you change the server's logging attributes.

Log information can be kept in either a flat ASCII file or in a database. If you want to keep a server's log information in a database, see the section below.

The attributes that you can change for a logging profile are summarized in Table 10-1:


Table 10-1 Logging Attributes

Attribute Name

What it does

DB Driver name  

Class name of the JDBC driver (e.g., oracle.jdbc.driver.OracleDriver  

DB Password  

Password for the database user  

DB User  

Userid for the database user  

Description  

Description of the database - usually just "logging"  

Log Location  

Where the log files are stored in case of file based logging and connection string to connect to the database in the case of databased logging  

Log Status  

Logs are ACTIVE or INACTIVE for this server  

Logging type  

Whether logs are stored as files or in a database  

Maximum Log Size  

Maximum size of a log file on this server  

Size of Log Read  

Maximum size allowed to be read at one time  

Number of Historical Files  

Number of backup log files to keep  

Attributes for the logging files for a server are normally inherited from the default platform settings, but can be changed to reflect the needs of a particular server. You can also delete a log file by selecting it and clicking the Delete button.

The Show and Hide Read/Write Permissions checkboxes tell you whether administrators or users are allowed to read and write the log files.


Storing Log Information in a Database

If you prefer to store the log information in a database, you can either configure a new installation to do so, or modify your current setup.


Configuring a New Installation
If you are setting up a new iPlanet Portal Server platform, you can directly indicate that log information is to be stored in a database. Follow these steps:

  1. At a terminal window, open the /iPS_install_location/netscape/server4/https-<servername>/config/jvm.conf file and add jar_file_path to the CLASSPATH, where jar_file_path is the location of the installed JDBC driver (eg: /export/tmp/OraThinDriver_v81.1.6.jar), where <servername> is the name of the machine where iPlanet Portal server has been installed.

  2. Save the file.

  3. At the terminal window (as root), type the following to restart the server and gateway:

    /iPS_install_location/SUNWips/bin/ipsserver start

    /iPS_install_location/SUNWips/bin/ipsgateway start

  4. In a browser window, log in to the Admin Console. Choose the Logging option on the menu (under Portal Server Services), then click on the Manage Logging Profile link.

  5. Choose the Show Advanced Options button at the bottom of the frame. The advanced options will be displayed.

  6. Change the Log Location to the connection string the system can use to connect to the database, such as: jdbc:oracle:thin:@ocf8.eng:1521:orcl.

    In this case, it means that we are using jdbc to make the connectivity using is Oracle's thin driver, the Oracle instance name is orcl, this instance is running on machine ocf8.eng and the listener port is 1521.

  7. Change the Logging type to JDBC.

  8. Enter the name of the database driver name, in this case, the driver name is oracle.jdbc.driver.OracleDriver.

  9. Enter the name of the database user you specified earlier during database installation for Database User Name, and enter the user's database password in the Database User Password field.

  10. Click the Submit button. A message will display indicating that the profile was saved successfully. Click the Continue button.

  11. If you have specified Log Status as ACTIVE, logging is now being sent to the database. To ensure that this is happening, look for tables with the same names as the logs.


Modifying an Existing Installation
You can modify an existing installation to send logging information to a database by following the same steps as indicated for Configuring a New Installation above. However, since the logging activity begins anew, you may wish to back up your existing data log files to a safe location prior to making this modification.



Note When you switch from File to DB logging, logging activities at that point forward take place in the DB, but the old logs are not transferred from File logs to DB logs.




Log Schema in the Database
For database logging, tables are created inside the database to store the logging information. There is one table of information for each log created. Therefore, there will be as many tables inside the database as there are log files created in the portal server. For example, for the iwtGateway log, a log table will appear in the database with the same name. Additionally, the internal table ips_logs is maintained with the list of all existing logs in the database.

The schema for a log file in general is as shown in Table 10-2.


Table 10-2 General Log Database File Schema

Name

Data Type

TYPE  

VARCHAR2 (20)  

LOGINID  

VARCHAR2 (50)  

DOMAIN  

VARCHAR2 (100)  

DATA  

VARCHAR2 (300)  

TIME  

VARCHAR2 (200)  

TYPE is the type of the log (e.g., Auth, Gateway, and so forth)

LOGINID is the login id of the client.

DOMAIN is the client domain from where the access is made.

DATA is the message to be logged.

TIME is a string representation of the date-time in yyyy/MM/dd hh:mm:ss format.

All data is stored in Unicode for I18N. The schema should not be changed and is exposed for informational purposes only.


Previous     Contents     Index     Next     
Copyright © 2000 Sun Microsystems, Inc. Some preexisting portions Copyright © 2000 Netscape Communications Corp. All rights reserved.

Last Updated May 04, 2000