Ad Widget

Collapse

Help with Web Scenario Triggers!

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • enkrypt3d
    Member
    • Oct 2013
    • 32

    #16



    How many of these threads that have the same question I have will go unanswered?

    Comment

    • enkrypt3d
      Member
      • Oct 2013
      • 32

      #17
      bueller?? Anyone have a solution for this? Why are the items hidden when the web scenario gets created? Doesn't that defeat the purpose?

      Comment

      • arikin
        Junior Member
        • Aug 2011
        • 27

        #18
        Web scenarios are weird

        Scenarios create checks that are commonly needed for web pages.
        For example: Download speed, Failed connection, and response code.

        To see the data a scenario is pulling in go to:
        Monitoring >> Latest Data
        Set the Group and/or Host to filter out every thing except that host.

        You should see the Name of the scenario on the left with a plus sign. Click on that to expand it. There you can see the download speed, connection success or failure, and response code.

        All you need are triggers to check the values of those items (No they don't show up under configuration...). Say for example your scenario is called Web (I know a bit generic). Combine the expression for the trigger like so:

        Item key: Host:web.test.in[Web,,bps]
        --> for the download speed

        Item key: Host:web.test.fail[Web]
        --> 1 = failed, 0 = success

        Item key: Host:web.test.error[Web]
        --> 200, 300, 404, etc (standard web error codes)

        Item names above are: web.test.in , web.test.fail, web.test.error

        Now when you create a scenario put in the actual URL in the Steps. At least at first. When you start getting data then you can try the Macros instead. Especially, when you try to make this into a template.

        You should try the example on this page at least once:

        Just walk through it and play around.
        Last edited by arikin; 05-12-2013, 08:35.

        Comment

        • enkrypt3d
          Member
          • Oct 2013
          • 32

          #19
          What is the item key for searching for a string? Not a response code... Thanks

          Comment

          • arikin
            Junior Member
            • Aug 2011
            • 27

            #20
            The items automatically created by web scenarios don't return strings.
            The response data for Host:web.test.error[Web] would be just the numerical codes. 200, 300, 404, 504, etc.

            Trigger expression example:
            {Host:web.test.error[Web].last(0)}>200

            If you are looking for the returned html body of the webpage then scenarios won't give you that.

            If you just want a human readable error code... You could use value mapping under Administration >> General
            But you would have to map all of these:
            official list: http://www.iana.org/assignments/http...us-codes.xhtml
            description: http://en.wikipedia.org/wiki/List_of_HTTP_status_codes
            Last edited by arikin; 06-12-2013, 05:07. Reason: thought about it a bit more

            Comment

            • enkrypt3d
              Member
              • Oct 2013
              • 32

              #21
              Yes I know what return codes are...

              Why is the string function available in the web scenario and you can't key off of it? That makes no sense. I was able to do this manually in 2.0.6 and now that feature is gone? That seems highly unlikely to me...

              Before 2.2 was out, I was able to manually create a web scenario for each host, and create the items and triggers.... but now that functionality has been removed when one of the major feature enhancements of 2.2 is the so called "improved" web scenario method...

              Comment

              • enkrypt3d
                Member
                • Oct 2013
                • 32

                #22
                Can anyone tell me why in 2.2, I am unable to trigger off of a string? Was this feature removed? This is why I was waiting to upgrade to 2.2... This is very frustrating.

                Comment

                • Kater
                  Junior Member
                  • Dec 2013
                  • 2

                  #23
                  Came here looking for the same thing.

                  As far as I can figure out you can only trigger on status code, not matched string.

                  Comment

                  • MaxM
                    Member
                    • Sep 2011
                    • 42

                    #24
                    Originally posted by Kater
                    Came here looking for the same thing.

                    As far as I can figure out you can only trigger on status code, not matched string.
                    You can trigger on failed step. If failed step > 0, then one of the steps has failed to match its string.

                    Comment

                    • richlv
                      Senior Member
                      Zabbix Certified Trainer
                      Zabbix Certified SpecialistZabbix Certified Professional
                      • Oct 2005
                      • 3112

                      #25
                      Originally posted by Kater
                      Came here looking for the same thing.

                      As far as I can figure out you can only trigger on status code, not matched string.
                      see "required string" in step properties
                      Zabbix 3.0 Network Monitoring book

                      Comment

                      • LenR
                        Senior Member
                        • Sep 2009
                        • 1005

                        #26
                        The configuration moved in 2.2, it's under each host (or template).

                        Comment

                        • enkrypt3d
                          Member
                          • Oct 2013
                          • 32

                          #27
                          Can someone post the item key for failed step? This issue needs to be resolved...

                          {host:web.test.fail[Scenario].last(0)}#0

                          gives me "invalid key format"...... this is the same issue I was having before.
                          Last edited by enkrypt3d; 12-12-2013, 19:46.

                          Comment

                          • LenR
                            Senior Member
                            • Sep 2009
                            • 1005

                            #28
                            Copied from an active template:

                            {Template App Zabbix Web:web.test.fail[Zabbix web].prev(0)}#0

                            Comment

                            • LenR
                              Senior Member
                              • Sep 2009
                              • 1005

                              #29
                              Last would work, prev above was an accident.

                              Comment

                              • MaxM
                                Member
                                • Sep 2011
                                • 42

                                #30
                                Originally posted by enkrypt3d
                                Can someone post the item key for failed step? This issue needs to be resolved...

                                {host:web.test.fail[Scenario].last(0)}#0

                                gives me "invalid key format"...... this is the same issue I was having before.
                                Instead of playing the 'guessing game', why not just click the add button and find the item and have zabbix populate the key for you?

                                Comment

                                Working...