Ad Widget

Collapse

WEB Monitoring - Need help with expression

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • xcalibur
    Member
    • Apr 2011
    • 40

    #1

    WEB Monitoring - Need help with expression

    Hey,

    I'm monitoring the availability of some websites. Since I'm getting some occasional timeouts I'd like Zabbix to fire off the trigger only after the third failure. So I set it up as follows:

    {URLS:web.test.fail[website.com].max(#4)}>3

    I'm not very sure about this. What does "{URLS:web.test.fail[website.com].max(#4)}" actually return? A true or false?

    Thanks
  • Yello
    Senior Member
    • Apr 2011
    • 309

    #2
    Hi,
    I don't use this style of trigger but I believe Max(#4) will return the largest of the last four values received.


    Regards,
    David

    Comment

    • ghoz
      Senior Member
      • May 2011
      • 204

      #3
      http://www.zabbix.com/documentation/...g#web_scenario
      This item keeps number of failed step of the scenario. If all steps are executed successfully, 0 is returned.
      Item key: web.test.fail[Scenario]
      Type: integer
      I would use a
      {URLS:web.test.fail[website.com].min(#4)}#0
      meaning 4 tests out of 4 had at least a failed step.

      On the other hand, your site is failing every fourth request, you'll never see it...
      you could add some kind of failsafe count : if there is that much failure in the last 20 checks , ring a bell...
      you 'd have to create a new trigger or add to the existing one something like
      OR {item.count(#20,0,”gt”)} > 4
      Last edited by ghoz; 11-07-2011, 09:12.

      Comment

      • Davidus
        Senior Member
        • Dec 2010
        • 281

        #4
        My condition looks like this
        Code:
        {HOST:web.test.fail[SERV].min(#15,0)}#0
        I`m doing checks once in 5 minutes, so if after 15minutes (3 checks) problem still exists trigger fires up
        Hope this helps

        Comment

        • xcalibur
          Member
          • Apr 2011
          • 40

          #5
          Originally posted by ghoz
          http://www.zabbix.com/documentation/...g#web_scenario


          I would use a
          {URLS:web.test.fail[website.com].min(#4)}#0
          meaning 4 tests out of 4 had at least a failed step.

          On the other hand, your site is failing every fourth request, you'll never see it...
          you could add some kind of failsafe count : if there is that much failure in the last 20 checks , ring a bell...
          you 'd have to create a new trigger or add to the existing one something like
          OR {item.count(#20,0,”gt”)} > 4
          It should actually be a whole lot simpler than that:

          {URLS:web.test.fail[website.com].MAX(#4)}#0

          If 4 fails occur the trigger will fire.
          I just tested and it works great!

          Thank you guys alot!

          Comment

          • Yello
            Senior Member
            • Apr 2011
            • 309

            #6
            Originally posted by xcalibur
            It should actually be a whole lot simpler than that:

            {URLS:web.test.fail[website.com].MAX(#4)}#0

            If 4 fails occur the trigger will fire.
            I just tested and it works great!

            Thank you guys alot!
            That will be a mistake I think. What that statement says to me is that if the highest of the last 4 checks is not equal to 0 then fire. Using Min() is better because that implicitly means that all of the checks in the window of data have breached the threshold.

            Also, do you really want a threshold of zero? You showed a different threshold level in your first post.


            Regards,
            David

            Comment

            • ghoz
              Senior Member
              • May 2011
              • 204

              #7
              the return value is the failed step, 0 if everything is OK

              so using 'max' in this context means that if even one out of 4 tests fail => trigger fires, and get back to normal when 4 tests in a row are OK

              using min as i suggested would do the oposite : if 4 tests fails => trigger fires, when the scenario succeeds for the 1st time => send an OK ...

              depending on what you need, pick your choice

              Comment

              • ghoz
                Senior Member
                • May 2011
                • 204

                #8
                Originally posted by Davidus
                My condition looks like this
                Code:
                {HOST:web.test.fail[SERV].min(#15,0)}#0
                I`m doing checks once in 5 minutes, so if after 15minutes (3 checks) problem still exists trigger fires up
                Hope this helps
                Be careful, you want to use min(900) an NOT min(#15) !
                using the '#' means last 15 checks => 75minutes of errors befor your trigger alerts you!
                your boss may not be happy :-)
                Last edited by ghoz; 11-08-2011, 09:14. Reason: min(15) => min(900) (time is in seconds, not minutes, duh...

                Comment

                • Davidus
                  Senior Member
                  • Dec 2010
                  • 281

                  #9
                  Originally posted by ghoz
                  Be careful, you want to use min(15) an NOT min(#15) !
                  using the '#' means last 15 checks => 75minutes of errors befor your trigger alerts you!
                  your boss may not be happy :-)
                  I`m doing checks every minute and if after 15 minutes (15 checks) problem still exist trigger fires up… sorry for inconvenience

                  Comment

                  Working...