DX Application Performance Management

Setting Script Status to Critical in WTG

  • 1.  Setting Script Status to Critical in WTG

    Posted Jun 19, 2012 11:56 AM
    Hi,

    In WTG Scripts when you are trying to validate on some condition and upon failure of that condition, when you are trying to stop the script using the <stop></stop>. The Value of the Script Status (In EM Investigator) is still not set to Critical, even though you specified stop=critical in the attributes of the Script. In this case to set the value of the Script Status to Critical you have to use <status>critical</status>.

    Difference between <stop> and <status>

    <stop> Only stops the Further execution of the requests, and it is not going to set the status to Critical, even though stop=critical attribute is set at the script level.

    <status> Not only stops the script but also sets the Script Status to critical in the Introscope, which we can use for alerting purpose.

    Eg.
    (Please Note that this is sudo code, not really working code)

    Script 1
    *********
    <script>
    <attributes>stop=critcal</attributes>
    <request>
    <parse>Welcome to %%CompanyName%% World </parse>
    <url>www.ca.com</url>
    </request>
    <if>%%CompanyName%%!=CA
    <then>
    <stop></stop>
    </then>
    </if>
    </script>

    Script 2
    *********
    <script>
    <attributes>stop=critcal</attributes>
    <request>
    <parse>Welcome to %%CompanyName%% World </parse>
    <url>www.ca.com</url>
    </request>
    <if>%%CompanyName%%!=CA
    <then>
    <status>critical</status>
    </then>
    </if>
    </script>

    Assuming if condition is True, The company name we got is some XYZ instead of CA

    So after executing of the Script 1
    In the Investigator Window if we you see the Script Status is still set to 1.

    After Executing of Script 2
    In the Investigator window if we see the Script Status is set to 3. Which indicates that the is some problem with website we are hitting, which we can use for alerting purpose.

    I wish CA had this <status> tag documented in the APMTG docs.

    Thanks
    Regards
    Murali Kakula