DX Application Performance Management

Expand all | Collapse all

query historical events

Jump to Best Answer
  • 1.  query historical events

    Posted 01-24-2016 05:22 AM

    hello

     

    we have  ca wily intoscope  V 10.1.0.

    i wanted to know if there is an option to to scheduled a job to run every day and save to a file the historical events ?

     

    Regards,

    Oded



  • 2.  Re:  query historical events
    Best Answer

    Broadcom Employee
    Posted 01-24-2016 02:55 PM

    Hello Oded,

    Yes you can use the Command Line Workstation (CLW) to do this with "get historical events matching [REGULAR EXPRESSION]"

    The wiki section for the CLW has an example:Transaction Trace Queries from Transaction Events Database

    However the syntax is incorrect and a correct example is in KB TEC1134715:

    How to extract all historical events by using CLW

     

    e.g. this command run from a Windows EM environment

    C:\Int10.1.0.15\jre\bin\java -Duser=Admin -Dpassword= -Dhost=localhost -Dport=5001 -jar  C:\Int10.1.0.15\lib\CLWorkstation.jar get historical events  matching \"type:errorsnapshot\"

     

    Issues message for which file the data will be saved to:

    Writing Transaction Trace Data to C:\TransactionTraceData-20160125065129.xml

     

    Hope this helps

     

    Lynn



  • 3.  Re:  query historical events

    Posted 01-25-2016 06:57 AM

    Hello lynn

     

    tanx for the reply.

    i can run the command, but when i configure the date i get "No transaction traces collected".

    just when i configure --get historical events  matching "server_NAME" it runs ok but then the xml file is 77 MB.



  • 4.  Re:  query historical events

    Broadcom Employee
    Posted 01-25-2016 09:06 AM

    Hi BigSol:

        So it sounds that you have to take the XML file and use another tool to filter the output to what you desire. Or make the CLW query more specific so less results are returned. From your response, it appears Lynn's response answered your initial question. Please let us know if there are any followup questions

     

    Thanks

    Hal German



  • 5.  Re:  query historical events

    Posted 01-25-2016 09:40 AM

    Hello Hal

     

    i can only run the CLW query with hot name.

    i can't run with date arguments. i try yyyymmdd yyyyddmm and so on, but didn't get any answers.

    and another problem is how can i run it every day as a scheduled ?

     

    thanks for all the help,

    Oded



  • 6.  Re:  query historical events

    Broadcom Employee
    Posted 01-25-2016 03:59 PM

    Hi Oded:

        You could set up Windows Scheduler and the like to run the CLW query as a daily batch job. Can you provide an example of the query that you are using?

        Thanks

      Hal German

     

    Lynn_Williams



  • 7.  Re:  query historical events

    Posted 01-26-2016 03:24 AM

    java -Duser=Admin -Dpassword -Dhost=localhost -Dport=5001 -jar  "C:\Program Files\CA APM\Introscope10.1.0.15\lib\CLWorkstation.jar" get historical events  matching "SERVER_NAME" AND time:[20160124 TO 20160125]\"



  • 8.  Re:  query historical events

    Broadcom Employee
    Posted 01-26-2016 12:33 PM

    Just a reminder: when using CLW and using user and password, the password is sent cleartext over the wire. Consider using '-Dkeyfile' property instead.

     

    java -Dhost=localhost -Dport=5001 -Dkeyfile=c:\progra~1\caapm~1\Introscope10.1.0.15\config\internal\console\EM.public -jar ...
    

     

    Using the EM public key is a lot safer for those environments requiring all communications be secure.



  • 9.  Re:  query historical events

    Broadcom Employee
    Posted 01-26-2016 02:57 PM

    Hi:

    If that is what you typed as a query, you have a closing slash but not an opening one. So you should be getting an error no?

     

    changing to another date format may help. Trying also change date ranges to validate format and see if change pick up any data for any date

     

     

     

    Thanks

    Hal German



  • 10.  Re:  query historical events

    Posted 01-27-2016 02:46 AM

    tanx for all the help.

    it works fine now. the problem was with the Quotation Marks in the end. when i remove it, it works fine. the error message that i got was

    No transaction traces collected, so i didn't thought  its problem with the query



  • 11.  Re:  query historical events

    Broadcom Employee
    Posted 01-27-2016 04:46 AM

    Hi Oded:

    Glad it is working after your correction to the query.

     

    Hal German