...

Auditing in IBM Cognos 8 Proven Practice Product(s): Cognos 8.1 and 8.2

by user

on
Category:

movies and tv

8

views

Report

Comments

Transcript

Auditing in IBM Cognos 8 Proven Practice Product(s): Cognos 8.1 and 8.2
Proven Practice
Auditing in IBM Cognos 8
Product(s): Cognos 8.1 and 8.2
Area of Interest: Infrastructure
Business Analytics
Auditing in IBM Cognos 8
2
Copyright and Trademarks
Licensed Materials - Property of IBM.
© Copyright IBM Corp. 2010
IBM, the IBM logo, and Cognos are trademarks or registered trademarks of
International Business Machines Corp., registered in many jurisdictions
worldwide. Other product and service names might be trademarks of IBM or
other companies. A current list of IBM trademarks is available on the Web at
http://www.ibm.com/legal/copytrade.shtml
While every attempt has been made to ensure that the information in this
document is accurate and complete, some typographical errors or technical
inaccuracies may exist. IBM does not accept responsibility for any kind of loss
resulting from the use of information contained in this document. The
information contained in this document is subject to change without notice.
This document is maintained by the Best Practices, Product and Technology
team. You can send comments, suggestions, and additions to
[email protected]
Microsoft, Windows, Windows NT, and the Windows logo are trademarks of
Microsoft Corporation in the United States, other countries, or both.
Java and all Java-based trademarks and logos are trademarks of Sun
Microsystems, Inc. in the United States, other countries, or both.
Business Analytics
Auditing in IBM Cognos 8
3
Contents
1
INTRODUCTION ............................................................................................ 4
1.1
1.2
PURPOSE ..............................................................................................................4
APPLICABILITY .......................................................................................................4
2
LOGGING FOR AUDITING ............................................................................. 4
3
TURNING ON LOGGING TO THE DATABASE ................................................. 5
3.1
3.2
CONFIGURING THE DATABASE CONNECTION .................................................................... 5
SETTING THE LOGGING LEVEL ....................................................................................6
4
THE DS SERVLET ........................................................................................... 6
4.1
4.2
BUILDING AND DEPLOYING THE DS SERVLET ................................................................... 7
TESTING THE DS SERVLET.........................................................................................9
5
RUNNING THE SAMPLE REPORTS................................................................. 9
5.1
5.2
SETTING UP THE DATASOURCES IN IBM COGNOS 8........................................................... 9
RUNNING THE REPORTS ............................................................................................9
Business Analytics
Auditing in IBM Cognos 8
4
1
Introduction
1.1
Purpose
This document provides information on setting up IBM Cognos 8 auditing to a
database and deploying the sample reports.
1.2
Applicability
Applicable to IBM Cognos 81 and 8.2 on any supported platform.
2
Logging for Auditing
Most people are familiar with, or at least aware of, IBM Cognos 8 logging. By
default, plain text log files are created under the <c8_install>\logs
directory. These logs contain various categories of information, and are often
used for identifying errors within the IBM Cognos 8 environment. The level
of detail logged can be controlled, for example a system that is running well
may have a low level of detail, but when tracing an issue, such as unexpected
error messages or performance problems, then the logging level may be
increased to include diagnostic information that is not usually of concern.
Logging does not need to be exclusively for troubleshooting, by extracting
key information, the data can also be used for Auditing purposes – that is
tracking the activity taking place on the system. Some of benefits of auditing
usage include:
• Planning down time by identifying quiet periods.
• Justifying additional infrastructure requirements.
• Performance monitoring.
• License conformance.
• Identifying unused content.
To facilitate easier access to this kind of information, IBM Cognos 8 allows
logging to be directed to a relational database where it can be easily queried.
Business Analytics
Auditing in IBM Cognos 8
5
3
Turning on logging to the Database
3.1
Configuring the database connection
In IBM Cognos Configuration, under Environment | Logging right-click and
select New resourceDestination of the type Database and set up the
connection to your chosen database accordingly.
The auditing database is populated via a JDBC connection by the Content
Manager Service - similarly to Content Manager and Notification databases.
If you are using a different database for collecting the audit data (SQL
Server, Oracle, DB2 and Sybase are supported) to that of the datastores,
then ensure that the appropriate JDBC drivers are available.
After saving the settings and starting IBM Cognos 8, examining the specified
the database you should see the following tables created. If they are not,
check the cogserver.log file to see if any errors are indicated.
cogipf_action,
cogipf_agentbuild,
cogipf_agentrun,
cogipf_editquery,
cogipf_nativequery,
cogipf_parameter,
cogipf_runjob,
cogipf_runjobstep,
cogipf_runreport,
cogipf_sysprops,
cogipf_userlogon,
cogipf_viewreport
Business Analytics
Auditing in IBM Cognos 8
3.2
6
Setting the Logging Level
The logging level is set in IBM Cognos Connection under Server
Administration. The properties for each Dispatcher should be set to Basic
for each component.
The logging levels are not stored in a IBM Cognos 8 Deployment Archive,
even if Select the entire Content Store is chosen. If auditing reports are
developed in a test environment and deployed to production, ensure that the
logging level is set appropriately in all installations.
4
The DS Servlet
Information is logged as actions occur, for example, when a user logs in and
runs a report; the log in event is stored, along with the report execution
details. This allows activities to traced, but what if we want to trace
something that DOESN’T happen? Specifically, there may be a desire to
discover content that is not being used – the very fact that a report is never
accessed means that it will never appear in the audit files.
Business Analytics
Auditing in IBM Cognos 8
7
To allow this information to be obtained, a small SDK application is provided
with IBM Cognos 8 that queries Content Manager and provides a list of
content. The information is returned in the XML format that can be
consumed by IBM Cognos 8 as a data source.
4.1
Building and deploying the DS Servlet
1 - In a text editor, open the file web.xml located on the IBM Cognos 8
server under <c8_install>/webapps/p2pd/web-inf, and add the XML
fragments as below.
The first part of the web.xml file contains the servlet definitions (<servlet>
tags), add this text to create a new section:
<servlet>
<servlet-name>DSServlet</servlet-name>
<servlet-class>com.cognos.demo.DSServlet</servlet-class>
</servlet>
The new section should be inserted as below:
The second part of the web.xml contains additional mappings (<servletmapping> tags), add this text to create a new section:
<servlet-mapping>
<servlet-name>DSServlet</servlet-name>
<url-pattern>/cognos/DSServlet.jsp</url-pattern>
</servlet-mapping>
Business Analytics
Auditing in IBM Cognos 8
8
The new section should be inserted as below:
2 – Create the following directory on the IBM Cognos 8 server
<c8_install>/webapps/p2pd/web-inf/classes/com/cognos/demo.
3 - Copy the files build.bat (or build.sh for UNIX) and DSServlet.java (or
build.sh for UNIX) located in <c8_install>/webapps/Audit on the Gateway
server to <c8_install>/webapps/p2pd/web-inf/classes/com/cognos/demo on
the IBM Cognos 8 server.
4 - Edit the build.bat or build.sh file to ensure the JAVA_HOME
environment variable points to your JDK and that CRN_HOME points to your
IBM Cognos 8 location. You must use a JDK for JAVA_HOME – you cannot
use the JRE that ships with IBM Cognos 8 on Windows and it must not be
anything beyond 1.4.x.
5 – Edit the DSServlet.java file depending on your authentication settings:
•
If you are allowing anonymous logon, leave line 45 (which starts
binding.logon ... ) commented out.
•
If you are not allowing anonymous logon, make sure that the
username, password, namespace and endpoint variables are
correct and uncomment line 45 (which starts binding.logon ... )
6 - At a command prompt, run build.bat (or build.sh) from
<c8_install>/webapps/p2pd/web-inf/classes/com/cognos/demo. This should
create DSServlet.class .
7 - Restart the IBM Cognos 8 service.
Business Analytics
Auditing in IBM Cognos 8
9
4.2
Testing the DS Servlet
To test the DS Servlet is working correctly, access
http://<localhost>:<port>/p2pd/cognos/DSServlet.jsp via a
browser. XML should be returned containing a list of reports.
5
Running the sample reports
5.1
Setting up the datasources in IBM Cognos 8
Two datasources are required in IBM Cognos 8 in order to run the sample
reports.
• Audit
This is a regular database connection (Oracle, DB2, Sybase or SQL
Server) pointing back to the same database defined as the logging
database in IBM Cognos Connection
• url_xml
This should be defined as type XML and points back to the DS Servlet
(http://<C8_Server>:9300/p2pd/cognos/DSServlet.jsp)
5.2
Running the reports
Enable to sample Audit reports by copying the deployment called
Cognos_Audit.zip from <c8_install>\webcontent\samples\content\
to <c8_install>\deployment and importing through Content
Administration in IBM Cognos Connection as per any other deployment
package.
Business Analytics
Auditing in IBM Cognos 8
Business Analytics
10
Fly UP