Is there any way we can get all the errorsnapshot events under a hostname from HQV or CLW ? In HQV when I am trying to see errors happened in last 7 days I found more than 1000 errors have been found. But the viewer only shows last 500 errors and we can export only those visible records. Is there any way around to export all the events in CSV or XML format ? Kindly help.
The best feasible way that comes to my mind is to reduce the time period say 2-3 days and repeat the steps for the required duration.
Though manual but you will get all details. (which you could export and merge using some excel or XML features)
You can use CLW to accomplish by running a command like this:
get historical events matching "type:errorsnapshot and host:<your host name>"
thanks for the help.Is it also possible with time range and frequency? The above mentioned command returns all the error events saved in the traces DB against the host name. I tried with the command get historical events matching "type:errorsnapshot and host:<host_name>" for past 1440 minutes with frequency of 1440 seconds and without frequency also. But that is not working.
Is there any restriction?
I just successfully ran
java -Xmx128M -Duser=admin -Dpassword= -Dhost=localhost -Dport=5001 -jar /Applications/Introscope126.96.36.199/lib/CLWorkstation.jar "get historical events matching (type:errorsnapshot and host:<hostname>) for past 1440 minutes"
The quotes in you command seemed not correct. Use curly brackets for (type:errorsnapshot and host:<hostname>)!
Thanks a lot Guenter,
The command is working now. I want to state an observation in this regard. If I query with Historical Query Viewer with the same command ,i.e., type:errorsnapshot and host:<hostname> for 24 hours error data it is returning a different and lower no of transactions than we get from CLW.
I have ran the query for 10 Servers from HQV as well as CLW, and found this discrepancy. Moreover it is noticed that, while I invoke the mentioned query in your post, from CLW and query for last 1440 minutes, i.e., for 24 hours the generated XML is showing data from almost 5 days back which is not expected. As per my understanding, if I invoke this command on 28 May, 2015 at 01:05:38 AM then the returned XML should contain errors happened between 27 May,2015 01:05:38 AM - 28 May, 2015 01:05:38 AM, right ?
But in the returned XML I found data from 23 May,2015 00:24:46. Did you notice this kind of discrepancy? Is it an expected behavior? I couldn't get the use of time range in the returned results in this case.
Kindly share your concern on this.
I noticed the same when testing the above. It seems CLW ignores the provided time frame. Therefore HQV returns fewer and probably correct results for this timeframe.
Please open a support ticket for that issue! As Kulbir posted below the timeframe must be specified in the query instead.
What you see is expected(no need for a support issue) because when you use "get historical events ....for past x minutes" command last part is ignored and instead we use a internally defined time range. Only when you use "get historical data .." query we make use of "past x minutes" to determine the time range.
In your case if you want to specify a time range then use something like this:
The following command shows how to search for all Error Snapshots sent by Agent named "Tomcat Agent" between August 12th,2014 to August 20th,2014
C:\Introscope188.8.131.52\lib>java -jar CLWorkstation.jar get historical events matching "type:errorsnapshot and agent:Tomcat Agent and time:[20140812 TO 20140820]"
You can further limit data, for e.g in above query if you only want errorsnapshots that happened between 2 pm August 12th to 10 am August 20th then change above to:
C:\Introscope184.108.40.206\lib>java -jar CLWorkstation.jar get historical events matching "type:errorsnapshot and agent:Tomcat Agent and time:[2014081214 TO 2014082010]"
Hope this helps.
Thanks a lot for the help.
Now I am able to generate 24 Hour error data. But the 24 hour data from Historical Query Viewer is not matching with the CLW generated XML file. I am getting more no of transactions from CLW than the HQV results.
E.g., after querying for a server's 24 hour error transaction in HQV, I am getting total 807 records and the HQV window limiting the view upto 500 transaction. And I have provided a custom time range of 1st June 2015 04.25 AM - 2nd June 2015 04.25 AM.
But when I am running the query for the same period from CLW I am getting 815 transactions. Which one should I consider as the most relevant data for 24 hours?
am running the following query:
java -Xmx2048M -Duser=<> -Dpassword=<> -Dhost=<> -Dport=<> -jar CLWorkstation.jar get historical events matching "(type:errorsnapshot and host:<> and time:[201506010425 TO 201506020425])"
Can you please share your views?
Reference Data from HQV:
one possible explanation is a difference in timezones. Have you compared the different sets of data in more depth that just the count? Maybe reduce the timeframe to on or two hours to do that.