How to extract all historical events by using CLW

Document ID : KB000031320
Last Modified Date : 14/02/2018
Show Technical Document Details

Description:

By default, in Live mode, transaction trace events from the last 20 minutes are displayed. Transaction trace event older than 20 minutes are not displayed in live mode. No more than 500 transaction trace events are displayed.  This is described in the Workstation Guide: "Transaction Trace results appear in the Transaction Trace Viewer"

When trying to export all errors from the tool:

-In Workstation menu click on Query Historical events.
-In the Query box, enter type:errorsnapshot and select the required time range to search for all Error events.
-Click Edit > Select All to select all the events.
-Select Trace > Export to save these events as a xml file or else Trace > Save as to save as text file.

The exported .xml or .txt file will display the last 500 events only.

 

Solution:

By running the below CLW command, it allows extracting all historical events for a particular time range:

- Navigate to "APM_home\lib"

- Run the below command (eg: time range set from 16th of July 2015 to 18th of July 2015):

java -Duser=Admin -Dpassword= -Dhost=localhost -Dport=5001 -Xms512m -Xmx512m -jar CLWorkstation.jar get historical events matching \"type:errorsnapshot AND time:[20150716 TO 20150718]\"

The generated .xml will show all historical events from the 16th to the 18th of July 2015 even if there are more than 500.