Skip navigation.

Configuring and Using the WebLogic Diagnostic Framework

  Previous Next vertical dots separating previous/next from contents/index/pdf Contents Index View as PDF   Get Adobe Reader

Configuring Diagnostic Archives

The Archiver 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 on-line mode (that is, on a running server), you can also access archived data in off-line mode using WLST.

You can configure WLDF to archive diagnostic data to a file store or a Java Database Connectivity (JDBC) data source, as described in the following sections:

 


Configuring the Archive

The diagnostic archive is configured on a per-server basis, in the config.xml file for a domain, under the <server> element for the server. Examples for file-based stores and JDBC-based stores are shown in Listing 4-1 and Listing 4-3.

 


Configuring a File-Based Store

WLDF creates text files containing the archived information. The only configuration option for a WLDF file-based archive is the directory where the file will be created and maintained. The default directory is the data/store/diagnostics directory under the home directory for the server.

When you save to a file-base store, WLDF uses the WebLogic Server persistent store. For more information, see Using the WebLogic Persistent Store in Configuring WebLogic Server Environments.

An example configuration for a file-based store is shown in Listing 4-1.

Listing 4-1 Sample configuration for File-based Diagnostic Archive

<domain>
  <!-- Other domain configuration elements -->
  <server>
    <name>myserver</name>
    <server-diagnostic-config>
      <diagnostic-store-dir>data/store/diagnostics</diagnostic-store-dir>
      <diagnostic-data-archive-type>FileStoreArchive
      </diagnostic-data-archive-type>
    </server-diagnostic-config>
  </server>
  <!-- Other server configurations in this domain -->
</domain>

 


Configuring a JDBC-Based Store

To use a JDBC store, the appropriate tables must exist in a database, and JDBC must be configured to connect to that database.

Creating WLDF Tables in the Database

If they don't already exist, you must create the database tables used by WLDF to store data in a JDBC-based store. Two tables are required:

The SQL Data Definition Language (DDL) used to create tables may differ for different databases, depending on the SQL variation supported by the database. The following code listing shows the DDL that can be used to create WLDF tables in the PointBase database.

Listing 4-2 DDL Definition of the WLDF Tables for PointBase Database

-- DDL for creating wls_events table for instrumentation events
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,
  ARGUMENTS clob(100000) default NULL,
  RETVAL varchar(4000) default NULL,
  PAYLOAD blob(100000),
  CTXPAYLOAD VARCHAR(4000),
  DYES NUMERIC default NULL
);
-- DDL for creating wls_events table for instrumentation events
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;

Consult the documentation for your database or your database administrator for specific instructions for creating these tables for your database.

Configuring JDBC Resources for Use By WLDF

Once the tables are created in your database, you must configure JDBC to access the tables in the database. For information about configuring JDBC resources in WebLogic Server, see Configuring and Managing WebLogic JDBC.

Once you have created the tables and configured the JDBC resource, you can specify that resource as the data source for the JDBC store to be used for an archive for a server. An example configuration for a JDBC-based store is shown in Listing 4-3.

Listing 4-3 Sample configuration for JDBC-based Diagnostic Archive

<domain>
  <!-- Other domain configuration elements -->
  <server>
    <name>myserver</name>
    <server-diagnostic-config>
      <diagnostic-data-archive-type>JDBCArchive
      </diagnostic-data-archive-type>
      <diagnostic-jdbc-resource>JDBCArchive</diagnostic-jdbc-resource>
    <server-diagnostic-config>
  </server>
  <!-- Other server configurations in this domain -->
</domain>

 

Skip navigation bar  Back to Top Previous Next