Ad Widget

Collapse

Delaying only one trigger - zabbix 2.0

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • pietro54
    Senior Member
    • Feb 2011
    • 112

    #1

    Delaying only one trigger - zabbix 2.0

    Hi,
    Topic say evrything.
    I want a bit dealy only on one trigger.
    I read about trigger (there is no "sleep")
    http://www.zabbix.com/documentation/...onfig/triggers

    and about delaying actions( in zabbix 2.0, thouse screens look a bit different)
    http://www.zabbix.com/wiki/howto/con..._notifications
    But honestly i dont wanna use "action" way to realize this target.
    Is there any other way to realize this thing?
  • mbsit
    Senior Member
    • Sep 2012
    • 130

    #2
    Hi,
    There is no possible to delay triggerity.
    The only way is to delay action on one trigger.

    But, you can "delay" trigger when you use "avg" function.

    If you want to check ex. accessibility, where 1 is UP and 0 is Down (standard agent.ping)
    Then you can trigger like this: agent.ping.avg(300)=0
    Then you will delay trigger by 300 seconds, because avg will return exactly "0" when all components will be "0".

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

    Comment

    • pietro54
      Senior Member
      • Feb 2011
      • 112

      #3
      I figure it out in bit other way,
      There is my trigger
      Code:
      {TEST_HOST:proc.num[java].last(0)}<1 & {TEST_HOST:proc.num[java].time(0)}<142500 & {TEST_HOST:proc.num[java].time(0)}>150000 & {TEST_HOST:proc.num[java].dayofweek(0)}>5 |
      {TEST_HOST:proc.num[java].last(0)}<1 & {TEST_HOST:proc.num[java].time(0)}<162500 & {TEST_HOST:proc.num[java].time(0)}>173000 & {TEST_HOST:proc.num[java].dayofweek(0)}<5 | 
      {TEST_HOST:proc.num[java].last(40)}<1
      I dont wanna trigger work from 14:25 to 15:00 in saturday and sunday.
      I dont wanna trigger work from 16:25 to 17:30 form monday to friday.
      In the other hours it should work ok. (right)?
      Ok then in the exludet hours it should work like this:
      {TEST_HOSTroc.num[java].last(40)}<1
      So when the last value in last 40 sec is <1 then trigger should change his status.

      Is this correct?

      Comment

      • mbsit
        Senior Member
        • Sep 2012
        • 130

        #4
        Hi

        Your thinking is correct but logical operators are NOT.

        A set of time exclude each other.
        There is no possible to be less than 142500 and bigger than 150000 in the same time.

        Corrected first line:

        Code:
        ({TEST_HOST:proc.num[java].last(0)}<1 & ( {TEST_HOST:proc.num[java].time(0)}<142500 | {TEST_HOST:proc.num[java].time(0)}>150000 ) & {TEST_HOST:proc.num[java].dayofweek(0)}>5 )
        I like use of bracket for clarity.

        Bests,
        Grzegorz

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

        Comment

        • pietro54
          Senior Member
          • Feb 2011
          • 112

          #5
          Ok, i undurstund.
          But im wondering, if trigger will work, let say on sunday 14:55 ?
          I think in this combination it should work and change status to "problem"

          Comment

          • mbsit
            Senior Member
            • Sep 2012
            • 130

            #6
            But im wondering, if trigger will work, let say on sunday 14:55 ?
            No, the trigger will not fire this time ... on Sunday
            Pozdrawiam
            Grzegorz Grabowski
            ____
            Wdrożenia, szkolenia, umowy serwisowe
            Warszawa - Polska

            Comment

            • pietro54
              Senior Member
              • Feb 2011
              • 112

              #7
              Hi,
              there is a bit problem, trigger worked yesturday,
              Actualy he look like this :
              Code:
              {TEST_HOST:proc.num[java].last(0)}<1 & {TEST_HOST:proc.num[java].time(0)}<142500 | {TEST_HOST:proc.num[java].time(0)}>150000 & {TEST_HOST:proc.num[java].dayofweek(0)}>5 | {TEST_HOST:proc.num[java].last(0)}<1 & {TEST_HOST:proc.num[java].time(0)}<162500 | {TEST_HOST:proc.num[java].time(0)}>173000 & {TEST_HOST:proc.num[java].dayofweek(0)}<5 | {TEST_HOST:proc.num[java].avg(40)}<1
              And he fired up yesturday on 16:33.

              I will add few details.
              I got 4 machines witch working java on board, from 14:25 - 15:00 there is possibility the 4 java`s will be restarter exactly on the same time, I dont want to get 4mails with probllem and 4 mails with "ok" return. I wannt to create one trigger, if he goes to problem status other should not generate any problem.
              That trigger looks like this:
              Code:
              {Sprawdzanie polaczen:grpsum["Test_group","proc.num[java]","last","0"].last(0)}<2
              so if he goes down other trigger sholdent work.
              Ofc i made a dependence Host one depend on test group.

              I think it should work corecly, but the problem is that now im getting 5 mails,
              4 form host and one from group host.

              What can be problem?
              Should i give more time in
              Code:
              {TEST_HOST:proc.num[java].avg([B]40[/B])}<1
              or maybe change from avg to last.

              Piotr

              Comment

              • mbsit
                Senior Member
                • Sep 2012
                • 130

                #8
                Hi Piotr.
                When you are in trigger setup, switch to Expression constructor, then find and clik 'Test' and then you can simulate the trigger behavior.

                All is about good trigger definition

                Bests,
                Grzegorz

                --
                Wdrożenia, usługi IT - Warszawa
                Pozdrawiam
                Grzegorz Grabowski
                ____
                Wdrożenia, szkolenia, umowy serwisowe
                Warszawa - Polska

                Comment

                Working...