Wednesday, December 2, 2009

Configuration: Diagnostics JDBC store Archive

The Archive component of the WebLogic Diagnostic Framework (WLDF) captures and persists all data events, log records, and metrics collected by WLDF from server instances and applications running on them. You can access archived diagnostic data in online mode (that is, on a running server). You can also access archived data in off-line mode using the WebLogic Scripting Tool (WLST).

Here, I have given steps which have to be followed to configure JDBC store Diagnostics Archive. Database used is: Pointbase

1) Create a Datasource from weblogic console with the JNDI name say: DS1
2) Create the following tables in Database:

a) wls_hvst

DROP TABLE wls_hvst;
CREATE TABLE wls_hvst (
RECORDID INTEGER IDENTITY,
TIMESTAMP NUMERIC default NULL,
DOMAIN varchar(64) default NULL,
SERVER varchar(64) default NULL,
TYPE varchar(64) default NULL,
NAME varchar(250) default NULL,
ATTRNAME varchar(64) default NULL,
ATTRTYPE INTEGER default NULL,
ATTRVALUE VARCHAR(4000)
);
COMMIT;

b) wls_event

DROP TABLE wls_events;
CREATE TABLE wls_events (
RECORDID INTEGER IDENTITY,
TIMESTAMP NUMERIC default NULL,
CONTEXTID varchar(128) default NULL,
TXID varchar(32) default NULL,
USERID varchar(32) default NULL,
TYPE varchar(64) default NULL,
DOMAIN varchar(64) default NULL,
SERVER varchar(64) default NULL,
SCOPE varchar(64) default NULL,
MODULE varchar(64) default NULL,
MONITOR varchar(64) default NULL,
FILENAME varchar(64) default NULL,
LINENUM INTEGER default NULL,
CLASSNAME varchar(250) default NULL,
METHODNAME varchar(64) default NULL,
METHODDSC varchar(4000) default NULL,
DROP TABLE wls_events;
CREATE TABLE wls_events (
RECORDID INTEGER IDENTITY,
TIMESTAMP NUMERIC default NULL,
CONTEXTID varchar(128) default NULL,
TXID varchar(32) default NULL,
USERID varchar(32) default NULL,
TYPE varchar(64) default NULL,
DOMAIN varchar(64) default NULL,
SERVER varchar(64) default NULL,
SCOPE varchar(64) default NULL,
MODULE varchar(64) default NULL,
MONITOR varchar(64) default NULL,
FILENAME varchar(64) default NULL,
LINENUM INTEGER default NULL,
CLASSNAME varchar(250) default NULL,
METHODNAME varchar(64) default NULL,
METHODDSC varchar(4000) default NULL,

3) Create a WLDF Module from Diagnostics > WLDF Module and target to a server

4) For the diagnostics module create a Collection Metrics for JDBCDataSourceRuntimeMBean

5) Click on Diagnostics > Archives and select the server for which we need to collect data.

6) Change the archive type to JDBC instead of File store and select the datasource which has to be used for JDBC store
















7) Deploy any application which used database connection as we have configured the diagnostics module for JDBCRuntimeMbean and access the application.

8) The data will be archived in the table wls_hvst :















References:

http://download.oracle.com/docs/cd/E11035_01/wls100/wldf_configuring/config_diag_archives.html






No comments:

Post a Comment

Post a Comment