You are on page 1of 12

Setting Up Auditing:

This document is not intended to replace Cognos Support or Cognos


documentation, and is not endorsed by Cognos. eCapital Advisors, LLC does not
warrant or guarantee any of the information provided…use at your own risk.

Cognos documents these steps in the ‘Administration and Security Guide: chapter 16.’ I
have highlighted some of the key elements here.

Create the following directory structure:

In the DEMO directory, copy the contents of the <install


location>\cognos\c8\webapps\Audit (should be three files).

Install JAVA SDK (JRE) - http://java.sun.com/j2se/1.4.2/download.html


Open build.bat in a text editor, and alter the following:
Installation and Configuration – Cognos8

Alter the JAVA_HOME to match the installed location


Alter the CRN_HOME to match the installed location

Save and close the file.

Alter the DSServlet.java file:

Alter the namespace to match the namespace used in Cognos Configuration for the
authentication provider, alter the password to match the binding user’s password, and
alter the username to match the binding user.

Save and close the file.

Open web.xml (<install location>\cognos\c8\webapps\WEB-INF) in a text editor


and append the following:

2
Installation and Configuration – Cognos8
<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>

The web.xml should look like this:

Save the file.

Execute the build.bat file from a command prompt

Note – your location should be C:\


If the build executed correctly, you should have a new class file located in the DEMO
directory:

3
Installation and Configuration – Cognos8

Add a connection for logging in Cognos Configuration

Open Cognos Configuration  Logging, right-click on Logging, select New resource


> Destination

Enter a unique name for the database connection, and select Type: Database

Select the new resource-destination in the Explorer pane, right-click, select new
resource, and select Database.

Select the new resource-destination in the Explorer pane, right-click, select new
resource, and select Database – enter a name of Audit and select Oracle. Configure
the connection to connect to the Oracle instance and server, and alter the ID and
Password to be the Cognos_AS schema (DBA needs to create).

Select to Restart the services , answering ‘Yes’ to saving the configuration.

Create the data sources in Cognos Connection and Import the Audit deployment
package.

4
Installation and Configuration – Cognos8

Log into Cognos Connection (IE and enter the correct URL for Cognos8). Select
Tools  Directory

Select the Data Sources tab

Select the icon to create a new data source connection .

5
Installation and Configuration – Cognos8

Enter in the name ‘Audit’ for the name of the connection. ‘NEXT’

Select Oracle. ‘NEXT’

6
Installation and Configuration – Cognos8

Enter the SQL connect string, user ID and Password, making sure to check all three
boxes. Select to TEST and test the connection.

After testing, select ‘Close’ – ‘Close’ and then ‘Finish’

Create one more data source for auditing .

7
Installation and Configuration – Cognos8

Enter the name ‘url_xml.’ ‘NEXT’

Specify the type as ‘XML.’ ‘NEXT’

8
Installation and Configuration – Cognos8

Enter in the exact address above, altering the APPSERVER to the application server for
Cognos. Then test using the test link. Assuming all validates successfully, select
FINISH.

Next, we will import the canned reports and package for Auditing. First, we need to copy
the content package from the samples location to the deployment location on the
application server. Copy the Audit.zip file from <install
location>\cognos\c8\webcontent\samples\content to <install
location>\cognos\c8\deployment

In Cognos Connection, Select Tools  Content Administration

Select the new import icon .

Select the Audit content package.

9
Installation and Configuration – Cognos8

‘NEXT’ Then accept the default for the name ‘NEXT’. Select the Audit Package and
de-select the disable after import.

Accept all the defaults ‘NEXT’ – ‘NEXT’ – ‘NEXT’ and ‘FINISH.’ Select to run the job
NOW and the select ‘RUN.’ If you get a confirmation prompt select ‘OK.’

Finally, alter the Server settings in Cognos Connection. Access Cognos Connection,
select ‘Tools’ and select ‘Server Administration’

Click on the Configure tab, and then select the Properties icon under actions for each
Dispatcher (note, currently there is only one Dispatcher, but should you add another
server, you will have to do this again):

10
Installation and Configuration – Cognos8

Select the Settings tab

Set all the logging levels to ‘Request’ as shown above. Also, select the ‘Audit the native
query for batch report service’ Select OK.

11
Installation and Configuration – Cognos8

Re-enter the Properties/Settings Tab as done before, but choose to go to the 2nd page

Set the last logging to ‘Request’ and set the ‘Audit the native query for report service’ as
checked. Select ‘OK’

12

You might also like