Ad Widget

Collapse

Some comprehension problems with triggers

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • krusty
    Senior Member
    • Oct 2005
    • 222

    #1

    Some comprehension problems with triggers

    Hi,

    i have installed zabbix 1.1 for a log time ago. Till this day if only checked the bandwith and availability of more than 1500 hosts. Now i want to check some more detailed.

    I want to check two things.
    First: If the value of one item is over 100 the last 10 checks the trigger should fire a message to the administrator.
    I create the following trigger:
    Code:
    {<HOST>:<KEY>.avg(3000)>100
    I check the item in a period of 300sec and i want to check the last 10 values (300*10=3000) Could this trigger work? Or is there any other way to check the last 10 values?

    The second problem i have is:
    How can i check all value of one day. The trigger must fireing if 50 values of this day are over 100. Should i use the function count in association of max??? Or something different?

    I have checked the forum for answers but i haven't had found any help.

    If anyone have some ideas i would appreciative. Maybe you have examples for me how to do this.

    Greetz Krusty
  • hegermi
    Junior Member
    • Dec 2006
    • 19

    #2
    You may be in for some suprises there.

    I have noticed that for instance with the "Simple check" "icmpping" this type of calculation doesn't work.

    I goes fine regular when the host responds but becomes irregular when the host doesn't. Maybe due to a timeout setting somewhere.

    I have uncommented and changed some values in zabbix_server.conf, maybe this will help.
    # After how many seconds of unreachability treat a host as unavailable
    UnreachablePeriod=90

    # How ofter check host for availability during the unreachability period
    UnavailableDelay=10

    # How ofter check host for availability during the unavailability period
    #UnavailableDelay=60


    But maybe the type of checks you do remain more regular....

    Cheers,

    Michel

    Comment

    • krusty
      Senior Member
      • Oct 2005
      • 222

      #3
      Hi,
      i will not check icmpping or other simple checks.

      The item is type of "snmpv2 agent". Does it work with this type?

      With the values of this item (snmpv2 agent) i want to analysis this values.

      Regards

      Comment

      • hegermi
        Junior Member
        • Dec 2006
        • 19

        #4
        not sure until I get a host with problems

        Until I get a host with problems I wont know. So far all hosts respond and it is regular so you can asume a x second period should contain y polls.

        If this behaviour remains when there is a timeout I don't know.

        Simply being able to get the last x values would be a nice enhancement I think.

        Cheers,

        Michel

        Comment

        • krusty
          Senior Member
          • Oct 2005
          • 222

          #5
          Partial solution

          Hi,

          now i have create one trigger which should report if the last 10 values over 100.

          Code:
          {<SERVER>:<KEY>.max(3000)}>100
          But have still problems with the other trigger.
          I have try to use something like the follows but that wouldn't work.

          Code:
          {<SERVER>:<KEY>.max(86400)>100.count(288)}>50
          Have you any idea why it wouldn't work?

          288 = Count how many times the value will be return on one day.
          50 = maximum count (How many times the value will be over 100)

          Thanks

          Comment

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

            #6
            Originally posted by krusty
            I create the following trigger:
            Code:
            {<HOST>:<KEY>.avg(3000)>100
            I check the item in a period of 300sec and i want to check the last 10 values (300*10=3000) Could this trigger work? Or is there any other way to check the last 10 values?
            Yes! Use {<HOST>:<KEY>.avg(#10)}>100
            Alexei Vladishev
            Creator of Zabbix, Product manager
            New York | Tokyo | Riga
            My Twitter

            Comment

            • James Wells
              Senior Member
              • Jun 2005
              • 664

              #7
              Originally posted by krusty
              I create the following trigger:
              Code:
              {<HOST>:<KEY>.avg(3000)>100
              I check the item in a period of 300sec and i want to check the last 10 values (300*10=3000) Could this trigger work? Or is there any other way to check the last 10 values?
              A better way to do this one would be;
              Code:
              {<HOST>:<KEY>.avg(#10)}>100.0
              This says to compare 100 to the average of the last 10 values. Please note that unless you are using my bulk patch or Vince's AVG on Integers patch, then the key must be of type float.

              The second problem i have is:
              How can i check all value of one day. The trigger must fireing if 50 values of this day are over 100. Should i use the function count in association of max??? Or something different?
              Sadly, there is no easy way to do this. You could fire if the max value for the last day is over 100, or you could fire if the average value for the last day is over 100, or even the minimum value is over 100, but there is no mechanism to count the number of times it breaks 100 yet.
              Unofficial Zabbix Developer

              Comment

              • krusty
                Senior Member
                • Oct 2005
                • 222

                #8
                Trigger not working

                Originally posted by Alexei
                Yes! Use {<HOST>:<KEY>.avg(#10)}>100
                Hi,

                i use this trigger but the trigger would not change the status.

                I currently got values over 60.
                My trigger locks like
                Code:
                {<HOST>:<KEY>.avg(#10)}>60
                Well this trigger should change the status to TRUE but the trigger status is still UNKNOWN. Any idea why the trigger don't change the status?

                Comment

                • krusty
                  Senior Member
                  • Oct 2005
                  • 222

                  #9
                  Hi,

                  i have tested the example from Alexei, but the trigger doesn't work. Maybe there is one bug in the version 1.1.

                  Could someone please check if the trigger works with the version 1.1 of zabbix?

                  Thanks

                  Comment

                  • James Wells
                    Senior Member
                    • Jun 2005
                    • 664

                    #10
                    Can you post the item configuration and the full trigger as you have it in the UI please? I suspect I know what the issue is, but want to see all of the data first, just in case.
                    Unofficial Zabbix Developer

                    Comment

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

                      #11
                      Originally posted by krusty
                      Hi,

                      i have tested the example from Alexei, but the trigger doesn't work. Maybe there is one bug in the version 1.1.

                      Could someone please check if the trigger works with the version 1.1 of zabbix?

                      Thanks
                      It didn't work if item type is integer in some of 1.1.x releases, but I believe it is fixed in 1.1.6.
                      Alexei Vladishev
                      Creator of Zabbix, Product manager
                      New York | Tokyo | Riga
                      My Twitter

                      Comment

                      • James Wells
                        Senior Member
                        • Jun 2005
                        • 664

                        #12
                        Originally posted by Alexei
                        It didn't work if item type is integer in some of 1.1.x releases, but I believe it is fixed in 1.1.6.
                        Small correction. All versions of 1.1.x require float for avg, unless you apply my bulk patch or Vince's avg patch.
                        Unofficial Zabbix Developer

                        Comment

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

                          #13
                          You're absolutely right!
                          Alexei Vladishev
                          Creator of Zabbix, Product manager
                          New York | Tokyo | Riga
                          My Twitter

                          Comment

                          Working...