Ad Widget

Collapse

Counterpart to nodata()

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Andreas Bollhalder
    Senior Member
    Zabbix Certified Specialist
    • Apr 2007
    • 144

    #1

    Counterpart to nodata()

    Hello

    I have a trigger which change to ON when there has been no data from the ZABBIX agent for 180s:
    Code:
    {template:agent.ping.nodata(180)}=1
    Now, I'd like to have it extended to get OFF only, if there has been data for about 300s to prevent flapping and to keep up with the dependencies:
    Code:
    ({template:agent.ping.nodata(180)}=1)|(({TRIGGER.VALUE}=1)&({template:agent.ping.data(300)}=1))
    Unfortunatly, there is no function data() itself and I can't use nodata(300)=0. How can I archive this ?

    Thanks in advance
    Andreas
    Last edited by Andreas Bollhalder; 03-09-2007, 14:08.
    Zabbix statistics
    Total hosts: 380 - Total items: 12190 - Total triggers: 4530 - Required server performance: 224.2
  • Alexei
    Founder, CEO
    Zabbix Certified Trainer
    Zabbix Certified SpecialistZabbix Certified Professional
    • Sep 2004
    • 5654

    #2
    You may consider using function count() with one argument, count(180).
    Alexei Vladishev
    Creator of Zabbix, Product manager
    New York | Tokyo | Riga
    My Twitter

    Comment

    • Andreas Bollhalder
      Senior Member
      Zabbix Certified Specialist
      • Apr 2007
      • 144

      #3
      Hello Alexei
      Originally posted by Alexei
      You may consider using function count() with one argument, count(180).
      If I understand you right, the trigger should looks like:
      Code:
      ({template:agent.ping.nodata(180)}=1)|(({TRIGGER.VALUE}=1)&({template:agent.ping.count(300)}>x))
      where "x" should be smaller then "300 / interval" (smaller, because I observed that sometimes a value get missed) ?

      Thanks in advance
      Andreas
      Zabbix statistics
      Total hosts: 380 - Total items: 12190 - Total triggers: 4530 - Required server performance: 224.2

      Comment

      • Alexei
        Founder, CEO
        Zabbix Certified Trainer
        Zabbix Certified SpecialistZabbix Certified Professional
        • Sep 2004
        • 5654

        #4
        Hello Andreas,

        Yes, this is exactly what I meant.
        Alexei Vladishev
        Creator of Zabbix, Product manager
        New York | Tokyo | Riga
        My Twitter

        Comment

        • Andreas Bollhalder
          Senior Member
          Zabbix Certified Specialist
          • Apr 2007
          • 144

          #5
          Hello Alexei

          I implemented the trigger like:
          Code:
          ({template:agent.ping.nodata(180)}=1)
          |
          (({TRIGGER.VALUE}=1)&({template:agent.ping.count(300)}[COLOR=Red]<[/COLOR]9))
          but it doesn't behave as I expected. I use "<9", because I have the interval for the item "agent.ping" at 30s (in the post before I wrote it accidently wrong as ">9").
          Then 180s after stopping the agent, the trigger goes to TRUE and all dependend items goes to UNKNOWN. But when I start the agent (I waited more then 5 minutes), the trigger and it dependend items returns immediatly to FALSE instead after 300s. As far I can see, there aren't 9 values of "1 (Up)" in the the last 300s after starting the agent.

          Any ideas ? Do I miss something ?

          Andreas
          Zabbix statistics
          Total hosts: 380 - Total items: 12190 - Total triggers: 4530 - Required server performance: 224.2

          Comment

          • Andreas Bollhalder
            Senior Member
            Zabbix Certified Specialist
            • Apr 2007
            • 144

            #6
            I'm still unable to get the hysteresis working for the "agent.ping". I tried:
            Code:
            ({template:agent.ping.nodata(180)}=1)
            |
            (({TRIGGER.VALUE}=1)&({template:agent.ping.count(300)}<9))
            
            ({template:agent.ping.nodata(180)}=1)
            |
            (({TRIGGER.VALUE}=1)&({template:agent.ping.sum(300)}<9))
            The trigger for the agent ping goes immediatly to FALSE when the ZABBIX agent is reachable again.

            Did anyone got a solution for this ?

            Andreas
            Zabbix statistics
            Total hosts: 380 - Total items: 12190 - Total triggers: 4530 - Required server performance: 224.2

            Comment

            • pbergdolt
              Junior Member
              • May 2009
              • 10

              #7
              Hello, did you try something like this:


              ((({TRIGGER.VALUE}=0)&({template:agent.ping.nodata (180)}=1)))
              |
              ((({TRIGGER.VALUE}=1)&({template:agent.ping.count( 300)}<9)))



              ((({TRIGGER.VALUE}=0)&({template:agent.ping.nodata (180)}=1)))
              |
              ((({TRIGGER.VALUE}=1)&({template:agent.ping.sum(30 0)}<9)))

              Comment

              • Andreas Bollhalder
                Senior Member
                Zabbix Certified Specialist
                • Apr 2007
                • 144

                #8
                Originally posted by pbergdolt
                Hello, did you try something like this:


                ((({TRIGGER.VALUE}=0)&({template:agent.ping.nodata (180)}=1)))
                |
                ((({TRIGGER.VALUE}=1)&({template:agent.ping.count( 300)}<9)))



                ((({TRIGGER.VALUE}=0)&({template:agent.ping.nodata (180)}=1)))
                |
                ((({TRIGGER.VALUE}=1)&({template:agent.ping.sum(30 0)}<9)))
                Thank you for your answer. I'm using the following expression without "{TRIGGER.VALUE}=0" (it should be redundant) and it works:
                Code:
                ({template:agent.ping.nodata(150)}=1)|(({TRIGGER.VALUE}=1)&({template:agent.ping.count(120)}<4))
                I think it has been a problem of the ZABBIX version I used at that time.

                Andreas
                Zabbix statistics
                Total hosts: 380 - Total items: 12190 - Total triggers: 4530 - Required server performance: 224.2

                Comment

                Working...