The log consolidator application is a Java application that reads data from an BIRT iHub usage or error log file and uses JDBC to add the information to a database. In an BIRT iHub cluster, you must install and run the log consolidator application on each BIRT iHub node to consolidate the cluster’s usage and error log information in a database. Before running the log consolidator application, you must install the following components:
BIRT iHub
Log consolidator application files
Log consolidator configuration file
Database used by the log consolidator application
BIRT iHub installs the required JAR files for the log consolidator application in $ACTUATE_HOME/Jar/UsageAndErrorConsolidator. These files include:
usageanderrorconsolidator.jar
The com.actuate.consolidator application class and properties files.
Java Architecture for XML Binding (JAXB) JAR files
JAXB provides a framework that supports run-time mapping between XML and Java objects.
ojdbc14.jar
The supported Oracle JDBC Driver. The reference implementation uses Oracle as the example database.
naming-java.jar
Contains the handler for the Java namespace.
The log consolidator application also uses the following Microsoft Windows Registry keys or UNIX environment variables set by the BIRT iHub installation process:
On Windows, make sure the following registry keys exist:
The log consolidator application uses java.exe from:
AC_JRE_HOME\bin
On UNIX, make sure the following environment variables exist:
AC_JAVA_HOME
AC_JRE_HOME
The log consolidator application uses java.exe from:
$AC_JRE_HOME/bin
In BIRT iHub Integration Technology, the UsageAndErrorConsolidator directory contains additional files that you must use to complete the installation of the log consolidator application:
/DBScripts contains the SQL script, CreateActuateLogTables.sql, which creates the tables in the Oracle database used by the Actuate log consolidator sample application. A readme.txt file describes this SQL script file.
/jar contains the JAR files required by the log consolidator application.
/Setup contains the following files that startup and shutdown the log consolidator application:
consolidatorconfig.xml is the sample consolidator configuration file that specifies settings such as the following items:
Database driver, URL, encoding, schema, user name, and password
Usage and error log details, such as the file names, refresh interval, number of logs, and whether a log file is enabled
The UNIX version uses the scripts, start_consolidator.sh and stop_consolidator.sh, to start up and shut down the log consolidator application.
The Windows version uses a setup application, consolidatorwin.exe, that installs the log consolidator application as a Windows service and starts and stops the application.
A readme.txt file describes how to use these components.
/src contains the following items:
usageanderrorconsolidator.jar, the JAR file for the log consolidator application
consolidatormake.xml, an Ant build file
com.actuate.consolidator, the log application source code
How to install the log consolidator application
1 Edit the following settings in consolidatorconfig.xml:
JDBC driver name
URL, specifying the type of JDBC driver and database connection information, including host name, port, and database instance (SID) or service name, using the following syntax:
jdbc:oracle:thin:@//[HOST][:PORT][:SID/SERVICE]
Database login information, including schema, user name and password
Refresh interval
Measured in seconds. The default value is 10 seconds.
You may need to change the refresh interval depending on the amount of logging your system performs. The log consolidator application commits transactions to the database every 10 seconds or when the number of transactions exceeds 80, whichever occurs first.
Usage and error log settings:
Log file names
Number of log files for each type of file
The log file names and number of files must match the actual BIRT iHub configuration.
If you change a BIRT iHub setting, you must also change the corresponding consolidator configuration setting and restart BIRT iHub and the log consolidator application.
The following code example shows the default settings for consolidatorconfig.xml:
2 Copy the configuration file, consolidatorconfig.xml, to the following BIRT iHub directory:
$AC_SERVER_HOME/etc
3 Install and run the startup and shutdown files after setting up the database:
On a UNIX system, the following Actuate scripts start and stop the consolidator application:
start_consolidator.sh
Starts the log consolidator application. The script takes $AC_SERVER_HOME as an argument and uses it to set the following path variables:
Configuration file
JAR file directory
CLASSPATH
The script stores the process ID or PID in $AC_SERVER_HOME/etc/consolidator.pid. Add this script to BIRT iHub script start_srvr.sh to start the consolidator application whenever you start BIRT iHub. start_consolidator.sh attempts to start the application five times.
stop_consolidator.sh
Stops the log consolidator application. The script takes $AC_SERVER_HOME as an argument and uses it to read the log consolidator application PID from $AC_SERVER_HOME/etc/consolidator.pid and kills the process. Add this script to BIRT iHub script stop_srvr.sh to stop the consolidator application whenever you stop the BIRT iHub.
On a Windows system, the consolidatorwin.exe utility installs and removes the application as a Windows service, and starts and stops the consolidator application. The BIRT iHub installation process installs and runs the utility in the following directory:
$AC_SERVER_HOME\bin
Use the consolidator.exe utility to install and configure the consolidator application. This utility assumes it is running in the BIRT iHub \bin directory.
The consolidatorwin.exe utility supports the following command line syntax:
The command-line arguments specify the following options:
-H requests help on usage
-S specifies the following types of service:
auto adds the log consolidator as the Actuate Usage and Error Logging Consolidator 9 service that starts automatically when Windows restarts.
manual adds the log consolidator as the Actuate Usage and Error Logging Consolidator 9 service that requires manual startup when Windows restarts.
console starts the consolidator at a Windows command prompt.
remove stops the service.
-U specifies the username
The Windows user starting the consolidator application. Actuate recommends using the same user as the user that starts BIRT iHub.
-P specifies the password
The user password.
The following command adds the consolidator application as a Windows service that starts automatically when Windows starts:
consolidatorwin -Sauto -UUsername -PPassword
How to configure the log consolidator database
1 Configure a database server machine, Oracle server, and database.
2 Using Oracle SQL*Plus, log in as the system database administrator.
3 Run the CreateActuateLogTables.sql script.
The following command runs the CreateActuateLogTables.sql script from the install folder in the BIRT iHub Integration Technology installation for Windows:
CreateActuateLogTables.sql drops the ActuateLog and ActuateLogUser users, performs cascading deletes on all their objects, including sequences, tables, and indexes, and recreates these objects. The script creates the following database objects:
Tables to contain the usage and error log data
INSERT statements add predefined codes and descriptions for the event, file, job, object, operation, output format, service, and status types, after creating the tables.
Sequence generators to provide the values for usage and error event IDs when inserting log data
Each usage and error event ID is a unique value.
Indexes to contain primary and foreign key columns in the tables:
Primary key constraints on columns containing predefined codes ensure that these values are unique and not null.
Foreign key references on columns containing predefined codes ensure that these values are consistent with the values in the primary keys.
The ActuateLog schema contains the following tables and indexes:
AcAdminEvent
Contains the log records for administration operation events, including the following data:
Event ID
Object type code, indicating a User, Role, Channel, Group, File, or Folder object
Object operation code, indicating a Create, Delete, Modify, Login, Logout, or Download operation
Object name, version name, size, and attribute
Old and new values
Table 31‑7 shows the structure of the AcAdminEvent table.
Table 31‑7 Structure of the AcAdminEvent table
Column
Data type
Constraint
References
Key
EventId
INTEGER
AcApEv _AdEvId _Idx
AcEvent .EventId
Primary
ObjectTypeCode
INTEGER
AcObject Type .Object TypeCode
ObjectOperationCode
INTEGER
AcObject Operation .Object Operation Code
ObjectName
VARCHAR2(1000)
ObjectVersionName
VARCHAR2(255)
ObjectSize
INTEGER
ObjectAttribute
VARCHAR2(50)
OldValue
VARCHAR2(2000)
NewValue
VARCHAR2(2000)
AcApplicationEvent
Contains the log records for application events, including the following data:
Event ID
Executable name
Executable version, indicating an RPTDOCUMENT, RPTDESIGN, or other file type
Job type code, indicating an Async, Persistent, and Transient job type
Resource group ID
Dispatch node, indicating the volume, system, and server
Output format code, indicating PDF, XLS, HTML, or other output format
Table 31‑8 shows the structure of the AcApplicationEvent table.
Table 31‑8 Structure of the AcApplicationEvent table
Column
Data type
Constraint
References
Key
EventId
INTEGER
AcApEv _ApEvId _Idx
AcEvent .EventId
Primary
ExecutableName
VARCHAR2(1000)
ExecutableVersion
VARCHAR2(100)
AcFileType .FileTypeCode
FileTypeCode
INTEGER
Parameters
VARCHAR2(2000)
JobName
VARCHAR2(100)
JobTypeCode
INTEGER
AcJobType .JobTypeCode
JobSubmittedTimestamp
DATE
ResourceGroupId
INTEGER
AcResource Group .Resource GroupId
DispatchNode
INTEGER
AcSystem Component .System ComponentId
RequestId
VARCHAR2(100)
RequestWaitTime
INTEGER
RequestRunningTime
INTEGER
OutputName
VARCHAR2(1000)
OutputVersion
VARCHAR2(100)
OutputFormatCode
INTEGER
AcOutput Format .Output Format Code
OutputSize
INTEGER
PageCount
INTEGER
PageNumbersViewed
VARCHAR2(50)
AcErrorEvent
Contains the log records for error events, including the following data:
Error event ID
System component ID, indicating the volume, system, and server
User name
Error code, category, severity, parameters, and message
Table 31‑9 shows the structure of the AcErrorEvent table.
Table 31‑9 Structure of the AcErrorEvent table
Column
Data type
Constraint
References
Key
ErrorEventId
INTEGER
AcErEv_ErEvId _Idx
AcEvent .EventId
Primary
EventTimestamp
DATE
SystemComponentId
INTEGER
AcSystem Component .System ComponentId
UserName
VARCHAR2(255)
ErrorCode
INTEGER
ErrorCategory
VARCHAR2(255)
ErrorSeverity
INTEGER
ErrorParameter1
VARCHAR2(50)
ErrorParameter2
VARCHAR2(50)
ErrorParameter3
VARCHAR2(50)
ErrorMessage
VARCHAR2(255)
AcErrorLogOffset
Contains the following error log data:
File offsets
Volume names
Last update timestamp
Table 31‑10 shows the structure of the AcErrorLogOffset table.
Table 31‑10 Structure of the AcErrorLogOffset type
Column
Data type/Values
Constraint
References
Key
FileIndex
NUMBER
FileOffset
NUMBER
VolumeName
VARCHAR2(50)
NOT NULL
Primary
LastUpdateTimeStamp
NUMBER
AcEvent
Contains the log records for events, including the following data:
Event ID
Event timestamp
System component ID, indicating the volume, system, and server
Event type code, indicating a Generate, Print, View, Delete, Admin, Query, or Search event type
Start and end timestamps
Status code, indicating Success or Failure
Service type code, indicating a Factory, View, Encyclopedia, Integration, or Cache service type
Table 31‑11 shows the structure of the AcEvent table.
Table 31‑11 Structure of the AcEvent table
Column
Data type
Constraint
References
Key
EventId
INTEGER
AcSt_StCo_Idx
Primary
EventTimestamp
DATE
SystemComponentId
INTEGER
AcSystem Component .SystemComponent Id
UserName
VARCHAR2(50)
EventTypeCode
INTEGER
AcEventType .EventTypeCode
StartTimestamp
DATE
EndTimestamp
DATE
StatusCode
INTEGER
AcStatus .StatusCode
ServiceTypeCode
INTEGER
EventId
AcServiceType .ServiceType Code
AcEventType
Contains the codes and descriptions for event types, including the following data:
Event type code, including the following predefined values:
1 through 7
Event type description, including the following predefined values: