Introduction to the WebLogic Diagnostics Framework (WLDF)
Pages: 1, 2, 3

Accessing and Persisting Data

Once you have finished gathering the data, you will probably want to analyze it to find out what is going on in your system. Before you can do that, however, you will need to access the data and possibly persist it for historical purposes or just in case you call in sick or the data is collected over the weekend.

Data accessor

Diagnostic data is the event data generated from the Instrumentation component and the metric data generated by runtime MBeans and collected by the harvester; diagnostic data can be accessed from a running server or in offline mode, after the server shuts down. While the server is running you can access the data using the administration console, WLST, or third-party tools. In offline mode you can use the WLST command, exportDiagnosticData, to access archived data. Figure 4 illustrates the relationship the data accessor has with the other WLDF components.

Figure 4
Figure 4: The data accessor provides access to data generated from runtime MBeans and events generated by the Instrumentation component. It interacts with the harvester and archive to get the current and past state of harvestable values in the server.

WLDF uses the WLDFDataAccessRuntimeMBean to access data from the different types of data stores. A data store is a WLDF component that stores the gathered diagnostic information.

Data stores are separated by the types of diagnostic data, for example, server logs, HTTP logs, and harvested metrics. They can be modeled as tabular data where each record represents an item and the columns describe the characteristics of an item. Figure 5 illustrates the role of both online and offline data accessors.

Figure 5
Figure 5: Data can be accessed both online and offline. Online accesses current data and offline accesses stored data.

Archive

For long-term storage of diagnostic data, you will set up the WLDF data archiver. The Archiver component persists all data events, log records, and metrics collected by the WLDF from WebLogic Server and applications. The diagnostic archive is configured on a per-server basis in the config.xml for the domain, under the server element for the server. The data can be stored in a file or in a database. The WLDF file-based archive is the default storage for historic data and is stored in the data/store/diagnostics directory under the home directory for the server. The location of this file can be changed, and you can also choose to store long-term data in a JDBC-based store. The data archiver uses the following MBeans:

Conclusion

At this point you should have all the tools you need to track what is going on in your environment, including the servers, applications, and system resources. Runtime MBeans, log files, and the Instrumentation component generate data. The data harvester, watches and notifications, log files, and image capture gather the generated data into groups for your convenience. The data accessor helps you access the data using the administration console, WLST, or third-party tools. And finally, the data archiver helps you save the data in a file or in a database. If you are experiencing problems you can ensure the right data is being generated, gathered, and accessed. You then analyze the data to hopefully resolve the issue. If you are trying to enhance the performance in your environment, try creating an Instrumentation event that tracks how long it takes something to happen; if it takes longer than you would expect, have a watch notify you.

If you just want to do some long-term analysis of your environment, then you could take the data generated by the runtime MBeans, gather certain attributes with the data harvester (collected metrics), and persist these attributes in a database for use with a graphing tool. The (diagnostic) world is your oyster with the WebLogic Diagnostics Framework, and I'm sure you can think of a lot more ways to improve your WebLogic environment using the tools provided to you to generate, gather, access, and persist the data in your WebLogic server world.

References

Rebecca Sly is a curriculum developer in the education services group in BEA focusing on customer education. She started out with BEA in the UK working as an instructor teaching WLS, WLI and WLP courses to customers.