Data Stores Accessed by the Data Accessor Accessing Diagnostic Data Offline

13 Accessing Diagnostic Data With the Data Accessor 13-1 13 Accessing Diagnostic Data With the Data Accessor You use the Data Accessor component of the WebLogic Diagnostics Framework WLDF to access diagnostic data from various sources, including log records, data events, and harvested metrics. Using the Data Accessor, you can perform data lookups by type, component, and attribute. You can perform time-based filtering and, when accessing events, filtering by severity, source, and content. You can also access diagnostic data in tabular form. The following sections describe the Data Accessor and describes how to use it online when a server is running and offline when a server is not running: ■ Section 13.1, Data Stores Accessed by the Data Accessor ■ Section 13.2, Accessing Diagnostic Data Online ■ Section 13.3, Accessing Diagnostic Data Offline ■ Section 13.5, Resetting the System Clock Can Affect How Data Is Archived and Retrieved

13.1 Data Stores Accessed by the Data Accessor

The Data Accessor retrieves diagnostic information from other WLDF components. Captured information is segregated into logical data stores that are separated by the types of diagnostic data. For example, server logs, HTTP logs, and harvested metrics are captured in separate data stores. WLDF maintains diagnostic data on a per-server basis. Therefore, the Data Accessor provides access to data stores for individual servers. Data stores can be modeled as tabular data. Each record in the table represents one item, and the columns describe characteristics of the item. Different data stores may have different columns. However, most data stores have some of the same columns, such as the time when the data was collected. The Data Accessor can retrieve the following information about data stores used by WLDF for a server: ■ A list of supported data store types, including: – HTTP_LOG – HARVESTED_DATA_ARCHIVE – EVENTS_DATA_ARCHIVE 13-2 Configuring and Using the Diagnostics Framework for Oracle WebLogic Server – SERVER_LOG – DOMAIN_LOG – HTTP_ACCESS_LOG – WEBAPP_LOG – CONNECTOR_LOG – JMS_MESSAGE_LOG – CUSTOM_LOG ■ A list of available data store instances ■ The layout of each data store information that describes the columns in the data store You can use the WLDFAccessRuntimeMBean to discover such data stores, determine the nature of the data they contain, and access their data selectively using a query. For complete documentation about WebLogic logs, see Configuring Log Files and Filtering Log Messages for Oracle WebLogic Server.

13.2 Accessing Diagnostic Data Online

You access diagnostic data from a running server by using the Administration Console, JMX APIs, or the WebLogic Scripting Tool WLST.

13.2.1 Accessing Data Using the Administration Console

You do not use the Data Accessor explicitly in the Administration Console, but information collected by the Accessor is displayed, for example, in the Summary of Log Files page. See View and Configure Logs in the Oracle WebLogic Server Administration Console Help.

13.2.2 Accessing Data Programmatically Using Runtime MBeans

The Data Accessor provides the following runtime MBeans for discovering data stores and retrieving data from them: ■ Use the WLDFAccessRuntimeMBean to do the following: – Get the logical names of the available data stores on the server. – Look up a WLDFDataAccessRuntimeMBean to access the data from a specific data source, based on its logical name. The different data stores are uniquely identified by their logical names. See WLDFAccessRuntimeMBean in the Oracle WebLogic Server MBean Reference. ■ Use the WLDFDataAccessRuntimeMBean to retrieve data stores based on a search condition, or query. You can optionally specify a time interval with the query, to retrieve data records within a specified time duration. This MBean provides meta-data about the columns of the data set and the earliest and latest timestamp of the records in the data store. Data Accessor runtime Mbeans are currently created and registered lazily. So, when a remote client attempts to access them, they may not be present and an InstanceNotFoundException may be thrown. Accessing Diagnostic Data With the Data Accessor 13-3 The client can retrieve the WLDFDataAccessRuntime’s attribute of the WLDFAccessRuntime to cause all known data access runtimes to be created, for example: ObjectName objName = new ObjectNamecom.bea:ServerRuntime= + serverName + ,Name=Accessor, + Type=WLDFAccessRuntime, + WLDFRuntime=WLDFRuntime; rmbs.getAttributeobjName, WLDFDataAccessRuntimes; See WLDFDataAccessRuntimeMBean in the Oracle WebLogic Server MBean Reference.

13.2.3 Using WLST to Access Diagnostic Data Online

Use the WLST exportDiagnosticDataFromServer command to access diagnostic data from a running server. For the syntax and examples of this command, see Diagnostics Commands in the WebLogic Scripting Tool Command Reference.

13.2.4 Using the WLDF Query Language with the Data Accessor

To query data from data stores, use the WLDF query language. For Data Accessor query language syntax, see Appendix A, WLDF Query Language.

13.3 Accessing Diagnostic Data Offline

Use the WLST exportDiagnosticData command to access historical diagnostic data from an offline server. For the syntax and examples of this command, see Diagnostics Commands in the WebLogic Scripting Tool Command Reference.

13.4 Accessing Diagnostic Data Programmatically