DX Application Performance Management

  • 1.  Re: Metrics regular expression issue

    Posted Sep 15, 2014 10:51 AM

    Hi Lynn,

     

    Good day!

    I would like to seek your assitance, as im running a batch script to run a CLWorkstation but as i click the file the batch only produces a csv file with just a header and no data.

    can you please help me on this?

    Below is my script to generate a historical data:

     

    @echo
    set fromDate="9/8/14"
    set toDate="9/14/14"
    set agents=(.*SJWSVCLA002.*)
    set metrics=(PerfMon\"\|Process\|w3wp\(ClarityAppPool\):Working Set Peak)
    set freq=3600 secs
    set outputfile=C:\Users\AC93467\Desktop\TestLocation\file.csv

    set exec=java -Xmx128M -Duser=admin -Dpassword=admin -Dhost=208.76.237.222 -Dport=5001 -jar CLWorkstation.jar

    cd C:\Program Files\CA APM\Introscope9.5\lib
    %exec% get historical data from agents matching %agents% and metrics matching %metrics% between %fromDate% and %toDate% with frequency of %freq% > %outputfile%

     

    am i writing a rite metric code?

     

     

    Thanks in advance in your response.

    Arwin



  • 2.  Re: Metrics regular expression issue

    Broadcom Employee
    Posted Sep 15, 2014 11:12 AM

    You may also need to use the transaction trace property to output to console. I'm not in front of my computer but I think it's like 'clw.tt.console=true'.

    While you may see the output in your console window, the program may not allow you to redirect it without the additional property.


  • 3.  Re: Metrics regular expression issue

    Posted Sep 15, 2014 11:21 AM


    Hi Haruhiko,

     

    When i tried to test this set metrics like this : (GC:Heap in Use) it generates a file with an output, but if i try to put this metrics.(set metrics=(PerfMon\"\|Process\|w3wp\(ClarityAppPool\):Working Set Peak) the file doesnt have any data just a header of the metric in a csv file. I think there is just a problem in a metrics syntax part

     

    Thanks,

    Arwin



  • 4.  Re: Metrics regular expression issue

    Broadcom Employee
    Posted Sep 15, 2014 11:54 AM
    Try not to use parentheses unless you're writing a regular expression. Use double-quotes for your whole string and single quotes for anything inside your double quotes.
    I still recommend the additional parameter I mentioned earlier since CLW may not redirect your console output without it.


  • 5.  Re: Metrics regular expression issue

    Posted Sep 15, 2014 12:25 PM


    Hi Haruhiko,

     

    Good morning, it works fine using your suggestion but what if there is a wildcard>? like this?

    set metrics="Backends\|amsprd\.washgas\.com:.*" i encountered and error

     

    Thanks for your help



  • 6.  Re: Metrics regular expression issue

    Broadcom Employee
    Posted Sep 15, 2014 01:02 PM
    Don't forget to escape all special characters,  like the period and asterisk. 


  • 7.  Re: Metrics regular expression issue

    Posted Sep 16, 2014 02:44 AM

    Hi Haruhiko,

     

    How can i do that escaping?

     

    Thanks,

    Arwin



  • 8.  Re: Metrics regular expression issue

    Posted Sep 16, 2014 03:31 AM

    Hi Haruhiko,

     

    I tried to escape the metrics : set metrics="Backends\\^|\\amsprd\\\.washgas\\\.com:(\.\*)" but no luck

     

    Thank you for your help.

     

    Thanks,

    Arwin



  • 9.  Re: Metrics regular expression issue

    Broadcom Employee
    Posted Sep 17, 2014 11:55 AM

    @echo off

    setlocal

    set APMHome="C:\\Program Files\\CA APM\\Introscope9.5\\lib"
    set fromDate="9/8/14 00:00:00"
    set toDate="9/14/14 23:59:00"
    set agents=".*SJWSVCLA002.*"
    set metrics="PerfMon\|Process\|ClarityAppPool\|w3wp:Working Set Peak"
    set freq="3600 secs"
    set outputfile="C:\\Users\\AC93467\\Desktop\\TestLocation\\file.csv"

    set exec="java -Xmx128M -Dhost=208.76.237.222 -Dport=5001 -Dkeyfile=%APMHome%\\config\\internal\\console\\EM.public -Dintroscope.clw.tt.console=true -jar %APMHome%\\lib\\CLWorkstation.jar"


    %exec% get historical data from agents matching %agents% and metrics matching %metrics% between %fromDate% and %toDate% with frequency of %freq% > %outputfile%

    endlocal

    pause