Ad Widget

Collapse

triggering against web scenario/step

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Yello
    Senior Member
    • Apr 2011
    • 309

    #1

    triggering against web scenario/step

    Hi,
    Ealier today I managed to satisfy myself that the "Required" field of the web step configuration actually does match text from a given page. I did this by changing the text to something random and noted an error reported on the web monitoring screen.

    However, that raises an interesting question. The web scenario I've configured has created three items:

    - Response time
    - Download speed
    - Response code

    If I create a trigger against the response code item then it always succeeds because the return code is always 200 regardless of whether the search string is found or not. So, can someone explain how I can trigger off a web scenario when the "required" string is not matched?


    Regards,
    David
  • Rudd
    Member
    • Mar 2011
    • 69

    #2
    Hi David,

    When creating the trigger look for the item "Failed step of scenario". That will trigger when the "Required" value does not match, or any other test of the scenario fails.

    The resulting trigger should look something like this:

    {www.site.com:web.test.fail[Web Application].last(0)}#0

    Comment

    • Yello
      Senior Member
      • Apr 2011
      • 309

      #3
      Thank you. I'll try that out a little later.

      Can I also ask about the rationale behind web steps? Are these simply a mechanism for group similar actions, in this case string searches? Or are they intended for group serially related actions that should be performed one after the other?

      I am assuming it's the latter. Is that right?


      Regards,
      David

      Comment

      • Rudd
        Member
        • Mar 2011
        • 69

        #4
        That is correct. It allows you to create a step by step scenario

        Comment

        • mushero
          Senior Member
          • May 2010
          • 101

          #5
          Originally posted by Rudd
          Hi David,

          When creating the trigger look for the item "Failed step of scenario". That will trigger when the "Required" value does not match, or any other test of the scenario fails.
          Great, but how to tell the difference between a timeout, text mismatch, and return code mismatch - we want to trigger separately on each situation.

          Comment

          • Yello
            Senior Member
            • Apr 2011
            • 309

            #6
            Hi,
            Yes, I use separate triggers for each. And then overlay those with a master trigger so that only 1 failure will generate a callout alarm. Otherise you can suffer "callout storms" where callout would suffice, when several steps of several scenarios fail.


            Regards,
            David

            Comment

            • mushero
              Senior Member
              • May 2010
              • 101

              #7
              Would love to see your trigger examples as I spent quite a bit of time but couldn't figure out how to separate them, in part because the data items are all zero if there is any failure in the step, i.e. return code & response time are zero so I can't tell the difference between the error types. A bit thanks if you can help.

              Comment

              • Yello
                Senior Member
                • Apr 2011
                • 309

                #8
                Originally posted by mushero
                Would love to see your trigger examples as I spent quite a bit of time but couldn't figure out how to separate them, in part because the data items are all zero if there is any failure in the step, i.e. return code & response time are zero so I can't tell the difference between the error types. A bit thanks if you can help.
                Show me what you've done so far.

                Comment

                • mushero
                  Senior Member
                  • May 2010
                  • 101

                  #9
                  Deleted them all now as I gave up.

                  We are interested in at least three situations:
                  - Timeout, bad host name, etc. - all failure to connect
                  - Bad response code, such as 5xx
                  - Bad text match

                  Seems we have a few pieces of data:

                  Response time
                  Response code
                  Failure step

                  Our standard trigger is:
                  {srv-xxx-web1:web.test.fail[www.xxx.com].last(0)}>0

                  This triggers on any failure.

                  My original thought was to combine them, such as this logic:
                  - test.fail() and Response time > 30 = response time problem
                  - test.fail() and Response code <> 200 = response code problem
                  - test.fail() and NOT (Response time > 30 OR Response Code <> 200) = timeout

                  But if test.fail() happens the response time and code are zero, so useless, it seems.

                  I saw some note on testing the step of failure but not sure how that helps.

                  Would also love access to the text of failure, shown in the Status column of web monitoring as that has info on real failure such as mismatch, DNS lookup, etc.

                  Comment

                  • yong1515yong
                    Junior Member
                    • Nov 2011
                    • 1

                    #10
                    This posts did help a lots!
                    Thanks!

                    Comment

                    • Yello
                      Senior Member
                      • Apr 2011
                      • 309

                      #11
                      Originally posted by mushero
                      Deleted them all now as I gave up.

                      We are interested in at least three situations:
                      - Timeout, bad host name, etc. - all failure to connect
                      These are all picked up by web.test.fail

                      Originally posted by mushero
                      - Bad response code, such as 5xx
                      Picked up by web.test.rspcode and web.test.fail (if I recall)

                      Originally posted by mushero
                      - Bad text match
                      Picked up by web.test.fail.

                      Originally posted by mushero
                      Seems we have a few pieces of data:

                      Response time
                      Response code
                      Failure step

                      Our standard trigger is:
                      {srv-xxx-web1:web.test.fail[www.xxx.com].last(0)}>0

                      This triggers on any failure.

                      My original thought was to combine them, such as this logic:
                      - test.fail() and Response time > 30 = response time problem
                      In my experience this would never resolve to true. Many "fail" scenarios would lead to "too fast to be true" response times.

                      Originally posted by mushero
                      - test.fail() and Response code <> 200 = response code problem
                      - test.fail() and NOT (Response time > 30 OR Response Code <> 200) = timeout
                      It seems like you want to use trigger combinations to define what the problem is. I'm not sure that's practical at the moment.

                      My triggers look like this for most tests, and work quite well:

                      1. {svr1:web.test.fail[test1].min(#3)}#0 | {svr1:web.test.rspcode[test1,step1].count(#3,200,"eq")}=0
                      2. ({TRIGGER.VALUE}=0 & {svr1:web.test.time[test1,step1,resp].min(#3)}>5) | ({TRIGGER.VALUE}=1 & {svr1:web.test.time[test1,step1,resp].max(#3)}>3)

                      We have several triggers formatted like this. Then I have a master trigger, which i won't print because it is too long which will trigger a callout if any of the underlying triggers fire. That is, if one or more tests fail or responds too slowly then raise a callout.

                      Originally posted by mushero
                      Would also love access to the text of failure, shown in the Status column of web monitoring as that has info on real failure such as mismatch, DNS lookup, etc.
                      Yeah, I don't think that's possible. Although you could go direct to the database for the information I imagine. Raise that as a feature request if you think it would be useful.

                      Comment

                      Working...