You use audit reports to view the information in a logging database about user and report activity.
The information in this section is intended to help you
model the audit logging database in FrameWork Manager and create
reports based on your logging data. First, you must set up audit reporting .
You may want to refer to the sample model and sample
audit reports to
help you create audit reports. For information on the database schema
for audit reports, see Data Schema for Log Messages.
Before you can create audit reports or use the sample audit reports that come with IBM Cognos 8, you must set up audit reporting.
![]()
Direct log messages to a database.
Set up a logging database and configure log messages to be sent to the database. For information about configuring log messages, see the Installation and Configuration Guide.
Important: The logging database must be separate from the Content Store database.
![]()
Set the logging level for audit reports.
Set the logging level to Basic or higher. Do not set the logging level to Full, which will log too much information. For more information, see Set Logging Levels.
![]()
IBM Cognos 8 includes a sample model and sample audit reports that you can use.
IBM Cognos 8 includes a sample audit model in Framework Manager. The default location is c8_location/webcontent/samples/Models/Audit/Audit.cpf.
The following table lists the sample audit reports and describes the content of each report.
Before you can use them, you must set up the sample audit reports .
Audit report name | Description |
Agent execution history by user | Lists agent execution history by user and date and time range and includes a bar chart. It also includes the total number of times each agent was executed and the total number of agents that were executed. You can select a date and time range. |
Daily average and poor exceptions - all services | Shows how to monitor daily average and poor exceptions of thresholds set in IBM Cognos Administration for all services using an agent. An email with attached report output is sent to the administrator when average and poor exceptions occur. To run this report properly, you must first set thresholds in IBM Cognos Administration (see System Performance Metrics). To receive an email, you must specify a mail server account. For more information, see the IBM Cognos 8 Installation and Configuration Guide For more information on setting thresholds in IBM Cognos Administration, see System Performance Metrics. |
Daily metric exceptions | Lists daily metric exceptions for all services. |
Execute reports by package and report | Lists the reports that were run, by package. It also includes the user, timestamp, and execution time in milliseconds for each report. You can select a date and time range, one or more users, one or more packages, and one or more reports. |
Execute reports by user | Lists the reports that were run, by user and by package. It also includes the timestamp and execution time in milliseconds for each report. You can select a date and time range, one or more users, one or more packages, and one or more reports. |
Execution history by user | Lists the reports that were run alphabetically, along with the package and timestamp, by user, since the logging database was created. It includes the total number of reports each user ran and the total number of times each user ran each report. It also includes the total number of reports run by all users. You can select one or more users for the report. After you run the audit report, you can choose to view the statistics for a particular report or for all reports. |
Failed report executions - by package | Lists report failure executions by package and includes a pie chart, which also shows the failed percentage of each package. |
Failed service requests detect agent - all services | Detects preset thresholds for service request failures that are exceeded. An email is sent to the administrator with service failure metrics information. The report Service requests metrics - day report is run. To run this report properly, you must first set thresholds in IBM Cognos Administration (seeSystem Performance Metrics). To receive an email, you must specify a mail server account. For more information, see the IBM Cognos 8 Installation and Configuration Guide. |
Logon operations by time stamp | Shows logon and logoff timestamps and operations, by user. It also includes the total number of logons and the total number of logons for each user. You can select the time period and one or more users for the report. |
Logon operations by user name | Shows logon and logoff timestamp by user, along with the type of logoff operation that occurred. It includes the total number of logons and the total number of logons for each user. You can select one or more users for the report. |
Migration exceptions | A list report shows exceptions for migration tasks. |
Operations by selected object and users | Shows the operations that are performed on target objects, by user. It includes the target object path, timestamp, and the status of the operation. You can select one or more objects, operations, or users for the report. |
Report execution history (detailed report) | Lists reports alphabetically along with the associated package and the timestamp for each time the report was executed. It also shows the total number of times each report was executed and the total number of reports that were executed. It also includes a color-coded pie chart that gives an overview of how often the reports are used. |
Report execution history (summary report) | Lists reports alphabetically along with the timestamp for each time the report was run since the logging database was created. |
Report usage | Lists reports by frequency of use. For each report, it lists the user and the number of times it was run by the user since the logging database was created. This report can help you determine if there are any reports that are not being used. If so, you may want to remove them. |
Service requests metrics - day report | Shows percentage of successful and failed requests for IBM Cognos services for the current day. Includes a bar chart. |
User session - abnormal termination | Shows logon date and time of abnormally terminated user sessions. It also includes a total of session termination for all dates. You can select a date and time range. |
User session - details | Shows user session details, including the logon time, logoff time, logoff operation, and session duration. It also includes the total amount of session time for each user and the total amount of session time for all users. You can select a date and time range and one or more users. |
User session - logon errors for past 30 days chart | This audit report shows a bar graph of logon failures for the past 30 days. |
User session - summary | This audit report shows the average session duration by user. It also shows the total average session duration by user. You can select a date and time range and one or more users. |
View reports by package and report | This audit report lists users and timestamps for reports for the package that you select. You can select a date and time range, one or more users, and one or more reports. |
You must set up sample audit reports before you can use them. Before you begin, see Setting Up Audit Reporting
![]()
Create a data source connection to the logging database. The logging database and data source in IBM Cognos Connection must be named Audit.
Follow the procedure Add or Modify a Data Source Connection. For the data source name and database name, enter the name Audit. Confirm that the connection is working.
![]()
Set Up the Sample Report Usage Audit Report to create new data source named url_xml and using the URL as the connection string. This data source is only used by the Report Usage audit report.
![]()
Import the sample audit reports.
The file Cognos_Audit.zip is included with your installation and is located at c8_location/webcontent/samples/content.
Copy the file to c8_location/deployment, and then follow the procedure Import the Samples Cognos_Audit. In the public folders content list, select the check box for Audit.
The audit reports reside in the Public Folders area of IBM Cognos Connection.
![]()
Run the sample audit reports.
Tip: In IBM Cognos Connection, click Public Folders, click Audit, and click the audit report that you want to run.
Depending on the audit report that you select, you are prompted for report criteria.
The Report Usage Audit Report lists reports by frequency of use. Before it can be used, it must be set up.
In a text editor, open the web.xml file located at c8_location/webapps/p2pd/web-inf, and add the following XML fragment:
<servlet> <servlet-name>DSServlet</servlet-name> <servlet-class>com.cognos.demo.DSServlet</servlet-class> </servlet> <servlet-mapping> <servlet-name>DSServlet</servlet-name> <url-pattern>/cognos/DSServlet.jsp</url-pattern> </servlet-mapping>
Note that the url-pattern value can be anything you choose.
If you do not have the following directory on your system, create it: c8_location/webapps/p2pd/web-inf/classes/com/cognos/demo.
Copy the file build.bat for Windows or build.sh for UNIX located in c8_location/webapps/Audit to c8_location/webapps/p2pd/web-inf/classes/com/cognos/demo.
Edit the build file to ensure the JAVA_HOME definition points to your JDK and ensure the CRN_HOME definition points to your IBM Cognos 8 location.
If it is not already there, copy the DSServlet.java file from the c8_location/webapps/Audit directory to c8_location/webapps/p2pd/web-inf/classes/com/cognos/demo.
Do one of the following in the DSServlet.java file:
If you are allowing anonymous logon, comment out the following line: binding.logon(...)
If you are not allowing anonymous logon, make sure that the username, password, and namespace are correct and uncomment the following line: binding.logon(...)
At a command prompt, run build.bat or build.sh from c8_location/webapps/p2pd/web-inf/classes/com/cognos/demo.
Restart IBM Cognos 8 and open IBM Cognos Connection.
Create a data source connection to the XML data source by doing the following:
In the upper-right corner, click Launch, IBM Cognos Administration.
On the Configuration tab, click New Data Source.
Under Name, type url_xml.
Click Next.
Under Type, select XML.
Click Next.
In the Connection string field, enter the connection string. If you used the defaults, the connection string is http://localhost:9300/p2pd/cognos/DSServlet.jsp.
Click OK.