Ad Widget

Collapse

Triggers for web monitoring question

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • lukeiam
    Member
    • Sep 2012
    • 38

    #1

    Triggers for web monitoring question

    Hello,

    I am using Zabbix 2.0.2 on CentOS 5U8. I have set up web monitoring with the following trigger:

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

    as per:
    http://www.zabbix.com/documentation/...nitoring/items

    It works great, however I am monitoring some sites that are far away and it is possible they might fail a check or two. With the config above, I get a notification for every failure. I would like to set up this trigger in a way, that after 3 failed checks it triggers the notification. Is that possible?

    Regards,

    Luke
  • mbsit
    Senior Member
    • Sep 2012
    • 130

    #2
    Yes, its possible.

    Read DOC: http://www.zabbix.com/documentation/...gers/functions
    especially "last" function.

    Best,
    Grzegorz
    Pozdrawiam
    Grzegorz Grabowski
    ____
    Wdrożenia, szkolenia, umowy serwisowe
    Warszawa - Polska

    Comment

    • lukeiam
      Member
      • Sep 2012
      • 38

      #3
      Triggers for web monitoring question

      Thank you for the reply.

      Good find. I will bookmark that page.

      I read through the notes for the last parameter, but I am a little confused.

      since it's talking about # and a number do I to this:

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

      or this:

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

      Assuming I want it to trigger after 3 fails.

      Regards,

      Luke

      Comment

      • lukeiam
        Member
        • Sep 2012
        • 38

        #4
        Originally posted by mbsit
        Yes, its possible.

        Read DOC: http://www.zabbix.com/documentation/...gers/functions
        especially "last" function.

        Best,
        Grzegorz
        Thank you again for the reply. I don't know why my posts take so long to show up on the thread. Anyway, I reviewed that page, and it contains under the "last" option the following:

        "last(#3) - third most recent value (not three latest values)"

        This means it will look at the third value not compare last three. Am I understanding this correctly? If so, then this will not do as intend it to.

        Can you shed some more light on this?

        Regards,

        Luke

        Comment

        • mbsit
          Senior Member
          • Sep 2012
          • 130

          #5
          Sure

          You can trigger like this:
          {host:web.test.fail[Scenario].last(#3)}#0 & {host:web.test.fail[Scenario].last(#2)}#0 &
          {host:web.test.fail[Scenario].last(#1)}#0

          & = logical AND

          Maybe not "brilliant" but it's simple and easy to understand.
          Pozdrawiam
          Grzegorz Grabowski
          ____
          Wdrożenia, szkolenia, umowy serwisowe
          Warszawa - Polska

          Comment

          • lukeiam
            Member
            • Sep 2012
            • 38

            #6
            I'm sorry for the late response. My wife had a baby

            Anyway, the simplicity of this makes be embarrassed. Sorry I didn't figure it out and thank you kindly for the help!

            Regards,

            Luke

            Originally posted by mbsit
            Sure

            You can trigger like this:
            {host:web.test.fail[Scenario].last(#3)}#0 & {host:web.test.fail[Scenario].last(#2)}#0 &
            {host:web.test.fail[Scenario].last(#1)}#0

            & = logical AND

            Maybe not "brilliant" but it's simple and easy to understand.

            Comment

            • angelhc
              Senior Member
              Zabbix Certified Specialist
              • Nov 2009
              • 226

              #7
              Congrats for the baby!

              I think this issue could be better if check the last 3 values, for example:

              .-If you check the web each minute:
              {host:web.test.fail[Scenario].count(180,0) - the number of values for last 3 minutes that equal '0'

              Hope this help.
              Number of hosts 1600,Number of items +90k,Number of triggers +22k, Number of users +100, New values per second +1270

              http://zabbixes.wordpress.com/

              Comment

              • mbsit
                Senior Member
                • Sep 2012
                • 130

                #8
                Hi

                Hmm, yes we can do that, too.
                {host:web.test.fail[Scenario].count(180,0)}=3

                Bests,
                Grzegorz
                Last edited by mbsit; 12-11-2012, 16:38.
                Pozdrawiam
                Grzegorz Grabowski
                ____
                Wdrożenia, szkolenia, umowy serwisowe
                Warszawa - Polska

                Comment

                • lukeiam
                  Member
                  • Sep 2012
                  • 38

                  #9
                  Thank you.

                  This seems to work well:

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

                  But I will try yours too as it is shorter. Since I check every 5 mins, I would do:

                  {host:web.test.fail[Scenario].count(900,0)}=3

                  Is that correct?

                  Regards,

                  Luke

                  Comment

                  • novregen
                    Junior Member
                    • Jul 2013
                    • 10

                    #10
                    hi,

                    why don´t you use this one ?

                    {:.avg(900)}#1

                    So you get an alarm, if the web site can´t reach 3 time by an intervall of
                    300 seconds.

                    Comment

                    • davidca
                      Junior Member
                      • Jul 2019
                      • 1

                      #11
                      Hello-
                      While this is an older thread, I can't seem to find a similar one related to the structure on this thread that does seem to be near my question

                      Would wildcard values in the expression make sense or does the trigger always need to be a specific item?

                      I have setup a trigger for {host:web.test.fail[Scenario].last(0)}<>200 where the [Scenario] in the live expression is an ITEM but I wonder if this should be a wildcard variable like {host:web.test.fail[ANY-ON-HOST].last(0)}<>200 and thus trigger on any problem for any of the 20 website monitors based on not receiving and 200 response code.

                      But then I begin to wonder if all triggers should be custom to one web scenario and I would want one or many triggers active for every monitor? My overall objective:

                      My goal is monitoring web scenarios with importance on
                      1) not getting anything except a 200 (all OK) code from the web page
                      2) and the other alert would be for {host:web.test.in[SCENARIO,,bps].last(#2)}>=500 with objective of a warning if time is over 500ms.

                      Comment

                      Working...