Activate sample audit reports to view information about
user and report activity.
Before you begin
To use audit reports, you must direct logging to a database
and increase the log level. For information about configuring the
logging database, see
Configuring a Repository for Log Messages.
Tip:
- In this procedure, the logging database tables are created at
server startup. If you have a policy that only database administrators
can create the tables, you can use the c10_location\configuration\schemas\logging\database_type\LS_dblnit_database_type.sql script
to create them.
- The directories for JDBC drivers are: JazzSM_WAS_Profile\installedApps\localhostNode01Cell\IBM
Cognos.ear\p2pd.war\WEB-INF\lib and c10_location\webapps\p2pd\WEB-INF\lib.
Additionally, for DB2® on z systems: c10_location\bin64.
About this task
Audit reports are created based on the data from the logging
database. This information can help you plan your capacity, monitor
performance, or identify unused content. For more information about
audit reports and log settings, see
Cognos® Administration
and Security Guide.
You can find the sample audit report
package in c10_location\webcontent\samples\content.
Procedure
- Set up audit reporting.
- Set up sample audit reports
- Set up the Sample Report Usage audit report:
- Add the following XML fragment to the web.xml.noCM and web.xml.withCM files
located at JazzSM_WAS_Profile\installedApps\localhostNode01Cell\IBM
Cognos.ear\p2pd.war\WEB-INF\lib.
<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 url-pattern value
can be anything you choose.
- Create the JazzSM_WAS_Profile\installedApps\localhostNode01Cell\IBM
Cognos.ear\p2pd.war\WEB-INF\classes\com\cognos\demo directory
if you do not already have it.
- Copy the build.bat (Windows)
or build.sh (UNIX)
file from c10_location\webapps\Audit to JazzSM_WAS_Profile\installedApps\localhostNode01Cell\IBM
Cognos.ear\p2pd.war\WEB-INF\classes\com\cognos\demo.
- Update the build script with Tivoli® Common
Reporting JAVA_HOME and Cognos location: set
JAVA_HOME=JazzSM_WAS_Profile\java
set CRN_HOME=c10_location.
- Copy the DSServlet.java file from c10_location\webapps\Audit directory
to JazzSM_WAS_Profile\installedApps\localhostNode01Cell\IBM
Cognos.ear\p2pd.war\WEB-INF\classes\com\cognos\demo.
- In the DSServlet.java file, uncomment
the bind call and fill in a Tivoli Common
Reporting user,
password, and namespace. The default namespace is VMMProvider.
Update the endpoint (URL) to http://hostname:port/tarf/cognos/DSServlet.jsp.
- In the command-line interface, run build.bat
(Windows)
or build.sh (UNIX)
from JazzSM_WAS_Profile\installedApps\localhostNode01Cell\IBM
Cognos.ear\p2pd.war\WEB-INF\classes\com\cognos\demo. Ensure
a class file is generated.
- Restart Tivoli Common
Reporting.
- If you are using an application server other than Tomcat,
rebuild the application file and then redeploy IBM® Cognos BI
to the application server. For instructions, see .Cognos Installation
and Configuration Guide.
- Create a data source connection to the XML data source:
- In the reporting console, click .
- On the Configuration tab, click New
Data Source.
- Under Name, type url_xml and
click Next.
- Under Type, select XML and
click Next.
- In the Connection string field, enter http://hostname:port/tarf/cognos/DSServlet.jsp.