To use IBM Cognos product documentation, you must enable JavaScript in your browser.

Configuring Log Messages 

Log messages are an important diagnostic tool for investigating the behavior of IBM Cognos 8. In addition to error messages, log messages provide information about the status of components and a high-level view of important events. For example, log messages can provide information about attempts to start and stop services, completion of processing requests, and indicators for fatal errors. Audit logs, which are available from a logging database, provide information about user and report activity.

The IBM Cognos 8 services on each computer send information about errors and events to a local log server. A local log server is installed in the c8_location/logs folder on every IBM Cognos 8 computer that contains Content Manager or Application Tier Components. Because the log server uses a different port from the other IBM Cognos 8 components, it continues to process events even if other services on the local computer, such as the dispatcher, are disabled.

The following workflow shows the tasks that are required to prepare for logging.

      During planning, determine the logging configuration that is suitable for your environment. For example, evaluate various log message destinations, such as remote log servers and log files, such as the UNIX or Linux syslog or the Windows NT Event log, in addition to the local log file. You can also send only audit logging information to a database. Consider security, such as methods available for protecting log files from system failures and user tampering. For information about planning, see the Architecture and Deployment Guide.
      During configuration, define the startup properties for logging, such as connection settings for databases. You must also create a logging database if you plan to collect audit logs. If communication between a local log server and a remote log server must be secured, make the appropriate configuration changes on both IBM Cognos 8 computers. For information about configuring logging, see the Installation and Configuration Guide.
      When setting up logging, specify the level of detail to log to focus messages on the information that is relevant in your organization. Audit reports may also be set up to track user and report activity. For information about setting up logging, see the Administration and Security Guide.

For information about using log messages to solve problems and resolving logging-related issues, see the Troubleshooting section of the Administration and Security Guide.

Guidelines for Creating a Logging Database

You can create a database to store log messages. Creating a logging database involves the following tasks:

      

Create a logging database.

For DB2, Oracle, Microsoft SQL Server, or Sybase, use the same procedure that was used to create the content store database .

For DB2 on z/OS, use the instructions in Suggested Settings for Creating the DB2 Logging Database on z/OS.

      

Set up the database connectivity.

      

Specify the log messages destination.

Suggested Settings for Creating the DB2 Logging Database on z/OS

The database you create must contain some recommended configuration settings.

Use the following checklist to help you set up the logging database on DB2.

      

Log on to the z/OS system as a user with administrator privileges in DB2 on z/OS.

      

Create a database instance, storage group, and a user account for the content store. IBM Cognos 8 uses the credentials of the user account to communicate with the database server.

      

Ensure that you allocate a buffer pool with a page size of 8 KB for the database instance.

      

For a logging database in DB2 on z/OS, administrators must run a tablespace script to create tablespaces to hold large objects and other data for the logging database, and then grant user rights to the table. For information about running the tablespace script, see Create Tablespaces for DB2 Logging Database on z/OS.

Create Tablespaces for DB2 Logging Database on z/OS

A database administrator must run a script to create a set of tablespaces required for the logging database. The script must be modified to replace the placeholder parameters with ones that are appropriate for your environment.

Ensure that you use the name convention for DB2 on z/OS. For example, all names of parameters must start with a letter and the length must not exceed eight characters. For more information, see the IBM DB2 Information Center.

Steps
  1. Connect to the database as a user with privileges to create and drop tablespaces and to allow execution of SQL statements.

  2. Open the LS_tablespace_db2zOS.sql script file and use the following table to help you to replace the generic parameters with ones appropriate for your environment.

    Not all of the parameters listed are in the script, but may be added in the future.

    Parameter Name

    Description

    IPFSCRIPT_DATABASE

    Specifies the name of the logging database.

    IPFSCRIPT_STOGROUP

    Specifies the name of the storage group.

    IPFSCRIPT_TABLESPACE

    Specifies the name of the tablespace that contains the base tables in the logging database.

    This tablespace is not for Auxiliary tables.

    IPFSCRIPT_LOB_TABLESPACE

    Specifies the name of the tablespace that is allocated for auxiliary tables.

    IPFSCRIPT_BP

    Specifies the name of the 8 k buffer pool that is allocated for regular objects.

    IPFSCRIPT_USERNAME

    Specifies the user account that accesses the logging database.

  3. Save and run the script.

  4. Grant the IBM Cognos user rights to the tablespaces that were created when you ran the LS_tablespace_db2zOS.sql script file:

The logging database is created.

Set Up the Database Connectivity for the Logging Database 

After you create a database for audit logs, additional steps are required to set up the database client if you use Oracle, DB2, or Sybase as the database server.

You cannot use Cognos Content Database as a logging database.

Note: In a distributed environment, the local log server on an Application Tier Component computer may send log messages to a remote log server, which then sends messages to the logging database. For Oracle, Sybase, and DB2, the appropriate JDBC driver and database client software (DB2 only) is required only on the Application Tier Components computer with the remote log server that connects to the logging database.

Microsoft SQL Server Database

If you use a Microsoft SQL Server database, the JSQLConnect.jar file is installed to the appropriate location by default. The only additional step is to ensure that the Microsoft SQL Server uses TCP/IP connectivity.

Oracle or Sybase Database

If you use an Oracle or Sybase database, you must set up the JDBC driver on all Application Tier Components computers with a connection to the logging database. You must also set up the JDBC driver on the Content Manager computer, unless you are using the same type of database for the log messages as you use for the content store.

DB2 Database

IBM Cognos 8 uses JDBC connectivity to access the database used for the logging database.

For a DB2 database, you must set up the database client software and the JDBC driver on all Application Tier Components computers with a connection to the logging database. You must also set up the database client software and the JDBC driver on the Content Manager computer, unless you are using the same type of database for the log messages as you use for the content store.

If you use DB2 on Windows, Linux or UNIX as your logging database you must choose whether to use the type 2 or type 4 JDBC driver depending on how you want to connect to the logging database.

If you are using a DB2 database on z/OS for the logging database, you must use type 4 JDBC connectivity.

For more information about JDBC driver options for a DB2 database, see JDBC Driver Options for Using DB2 Database as a Content Store.

Steps for Oracle
  1. On the computer where Oracle is installed, go to the ORACLE_HOME/jdbc/lib directory.

  2. Copy the appropriate JAR file to the c8_location/webapps/p2pd/WEB-INF/lib directory on computers where Content Manager or Application Tier Components is installed.

    If the directory contains the classes12.jar file, delete it before installing the ojdbc14.jar or ojdbc5.jar file.

Steps for DB2 on Linux, UNIX, and Windows
  1. If you are using type 2 JDBC connectivity, install the DB2 client software on the Content Manager computers.

    If you use type 4 JDBC connectivity for DB2, you are not required to install the DB2 client software where Content Manager is installed.

    For more information about the differences between type 2 and type 4 drivers, see JDBC Driver Options for Using DB2 Database as a Content Store.

  2. If you are using type 2 JDBC connectivity, and the logging database is on a different computer than log server, configure a database alias to the logging database.

    Note: If the logging database and log server are on the same computer, the logging database name automatically becomes the alias.

  3. On Windows, stop the DB2 services and the HTML Search Server.

  4. Copy the following files from the DB2_installation/sqllib/java directory to the c8_location/webapps/p2pd/WEB-INF/lib directory.

    Tip: To check the driver version, run the command java -cp path\db2jcc.jar com.ibm.db2.jcc.DB2Jjcc -version.

  5. On Windows, restart the DB2 services and the HTML Search Server.

  6. Repeat this entire procedure on the IBM Cognos 8 computers where the software must be installed.

Steps for DB2 on z/OS
  1. Go to the DB2_installation/sqllib/java directory.

  2. Copy the following files to the c8_location/webapps/p2pd/WEB-INF/lib directory and c8_location/bin directories.

If you are using a DB2 database on z/OS for the logging database, you must use type 4 JDBC connectivity.

The driver version must be at least JCC 3.7 from Linux, UNIX, or Windows version 9.1 fix pack or JCC 3.42 from Linux, UNIX, or Windows version 9.5 fix pack 2.

Steps for Sybase
  1. On the computer where Sybase is installed, enable the JDBC driver using the following script:

    Sybase_location/jConnect-5_5/sp/sql_server12.5.sql

  2. Go to the Sybase_location/jConnect-5_5/classes directory.

  3. Copy the jconn2.jar file to the c8_location/webapps/p2pd/WEB-INF/lib directory on the appropriate Content Manager or Application Tier Components computers.

Log Message Destinations

A local log server is automatically installed when you install Content Manager or the Application Tier Components. You can specify one or more destinations where the local log server sends log messages:

For information about log messages, see the Architecture and Deployment Guide.

Remote Log Server

In a distributed installation, you can configure the log server on each IBM Cognos 8 computer to send log messages to a single remote log server, which acts as a common log server. You can then configure the common log server to send the log messages to a local file or database on the same or different computer.

If the remote log server becomes unavailable, log messages are redirected to recovery files on the local computer in the c8_location\logs\recovery\remote directory. These recovery files have timestamp information in their file names, and are not readable like regular log files. When the remote log server becomes available, an automatic recovery process moves all log information to the remote log server and deletes the local log files.

File

The log server is configured by default to send log messages to the c8_location/logs/cogserver.log file. If the default log file does not exist when the IBM Cognos 8 service starts, it is created automatically.

You can configure the log server to send log messages to a different file. If you configure a different log file, IBM Cognos 8 attempts to automatically create this file on startup, in addition to the default log file. If the location for the configured log file is different from the c8_location/logs directory, you must ensure the path to the log file exists before starting the IBM Cognos 8 service. For example, if you configure the log server to send messages to the c:/log_files/cognos.log file, IBM Cognos 8 attempts to automatically create the cognos.log file in the c:/log_files folder. If this folder does not exist, IBM Cognos 8 does not create the cognos.log file and no log messages can be recorded in it. Note that these log messages are not recorded in the default log file. Although IBM Cognos 8 automatically creates the default log file even when another log file is configured, the default log file is not used as a backup.

Database

The log server can also send audit logs to a database on the same or another computer. Audit logs provide information about user and report activity.

The logging database has the same configuration and user account requirements as the content store database. After you configure IBM Cognos 8 components to send messages to a logging database, and restart the IBM Cognos 8 service, IBM Cognos 8 components create the required tables and table fields. You can test the connection to the logging database before you restart the IBM Cognos 8 service.

Specify the Log Messages Destination

You can configure a type of destination for the log messages, and then configure properties for the specific destination. You can also configure more than one destination for log messages.

Before you specify a database as a destination, ensure that you

      created the logging database
      set up the database client
Steps for DB2, Linux, and Windows
  1. On the computer where you installed Content Manager or the Application Tier Components, start IBM Cognos Configuration.

  2. In the Explorer window, under Environment, click Logging.

  3. In the Properties window, use the following table to help set the log server properties.

    TaskAction

    Use TCP between IBM Cognos 8 components on a computer and its local log server

    Set the Enable TCP property to True.

    UDP provides faster communication with a lower risk of lost connections than TCP. However, the risk of losing a local TCP connection is low. TCP is always used for communication between a local log server and a remote log server.

    Change the number of threads available to the local log server

    Type the value in the Local log server worker threads property.

    Set a value between 1 and 20. The default value of 10 is recommended.

    However, if you have a high number of log messages, you can allocate more threads to improve performance.

    Apply UTF-8 encoding for log messages written to a file

    Set the Use UTF8 encoding property to True.

    If the IBM Cognos 8 component is using multibyte encoding, you must set this property to True and use a UTF-8 editor to view the log file. Otherwise, the log file may contain unreadable characters.

  4. In the Explorer window, under Environment, right-click Logging, and click New resource, Destination.

  5. In the Name box, type the name of the destination.

  6. In the Type list, click the type of destination and then click OK.

  7. If the destination is a file, in the Properties window, type the appropriate values for the mandatory and optional properties.

  8. If the destination is a remote log server, in the Properties window, type the appropriate values for the mandatory and optional properties.

    If the Internal dispatcher URI of the destination IBM Cognos 8 computer is configured to use SSL, in the Properties window, set the Enable SSL property to True.

    You must later specify the log messages destination when you configure the remote log server.

  9. If the destination is a database, in the Explorer window, under Logging, specify the type of database and its properties, as follows:

  10. Repeat steps 5 to 10 for each destination to which you want the log server to send messages.

  11. From the File menu, click Save.

  12. In the Explorer window, click IBM Cognos 8 service, IBM Cognos 8.

  13. From the File menu, click Restart.

    If you selected a database as the destination, IBM Cognos 8 components create the required tables and fields in the database that you created.

If the destination was a remote log server, configure and start the remote log server. Then restart the IBM Cognos 8 service on the local computer.

If the destination was a database, you can use IBM Cognos 8 components to run log reports from the database.

You can also set the logging level, which controls the amount of detail and type of messages that are sent to a log file or database. For instructions, see the Administration and Security Guide.

Steps for DB2 for z/OS
  1. On the computer where you installed Content Manager or the Application Tier Components, start IBM Cognos Configuration.

  2. In the Explorer window, under Environment, click Logging.

  3. In the Properties window, use the following table to help set the log server properties.

    TaskAction

    Use TCP between IBM Cognos 8 components on a computer and its local log server

    Set the Enable TCP property to True.

    UDP provides faster communication with a lower risk of lost connections than TCP.

    TCP is used for communication between a local log server and a remote log server.

    Change the number of threads available to the local log server

    Type the value in the Local log server worker threads property.

    Set a value between 1 and 20. The default value of 10 is recommended. However, if you have a high number of log messages, you can allocate more threads to improve performance.

    Apply UTF-8 encoding for log messages written to a file

    Set the Use UTF8 encoding property to True.

    If the IBM Cognos 8 component is using multibyte encoding, you must set this property to True and use a UTF-8 editor to view the log file. Otherwise, the log file may contain unreadable characters.

  4. In the Explorer window, under Environment, right-click Logging, and click New resource, Destination.

  5. In the Name box, type the name of the destination.

  6. In the Type list, click Database and then click OK.

  7. In the Explorer window, under Logging, right-click the database name, and click New resource, Database.

  8. In the Name box, type the name of the destination.

  9. In the Type list, click DB2 database and then click OK.

  10. In the Properties window, type the Database server and port number, User ID and password, and the z/OS Database name.

    Ensure that the User ID is the same as the value you specified for the IPFSCRIPT_USERNAME parameter in the LS_tablespace_db2zOS.sql script file, .

  11. In the Explorer window, click Local Configuration.

  12. In the Properties window, next to Advanced properties, click inside the Value box, and then click the edit button.

  13. Click Add, and then add the following configuration parameter names and values:

    Parameter NameValue

    IPFSCRIPT_CREATE_IN

    The base tables location.

    For example, databaseName.baseTablespaceName

    IPFSCRIPT_STOGROUP

    The name of the storage group.

    IPFSCRIPT_DATABASE

    The name of logging database.

    IPFSCRIPT_LOB_TABLESPACE

    The name of the tablespace that is reserved for auxiliary tables in the logging database.

  14. From the File menu, click Save.

  15. Test the connection to the new database. In the Explorer window, under Environment, right-click Logging and click Test.

    IBM Cognos 8 components connect to the database. If you configured more than one database for logging messages, IBM Cognos 8 components test all the databases.