Ad Widget

Collapse

How triggers work? How does it handle value changes?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • asteroidyorkton
    Member
    • Aug 2016
    • 53

    #1

    How triggers work? How does it handle value changes?

    I'm trying to setup interface trigger that will fire if the value is above 75%.
    How does trigger handle sudden change in value? Example: Traffic drop from 15Mbps to 840 kbps?
    Does trigger use calculated value (after conversion of units along with custom multiplier)?

    Example:
    Interface current traffic=50 Mbps
    Interface speed=1000 Mbps
    Threshold = 75%

    Item stored as Delta (speed per Second)
    Item units: bps
    Item multiplier: 8

    Trigger
    Interfaces:ifInOctets.1 * 100 / IfSpeed(100) > 75%
    50 Mbps * 100 / 1000 = 5% usage

    Suddenly Interface current traffic changes=840.02 kbps

    Interfaces:ifInOctets.1 * 100 / IfSpeed(100) > 75%
    840.02 * 100 / 1000 = 84% usage???

    I can't set a trigger based on total bytes greater than (ifInOctets.1.last(0)>80M) because I have different speed interface so want a different limit and set it in a prototype.
  • peatb
    Zabbix Certified Trainer
    Zabbix Certified Trainer
    Zabbix Certified SpecialistZabbix Certified Professional
    • Aug 2016
    • 36

    #2
    You're mixing up units here.
    Even though zabbix displays it in the graph as "50MBps", in the database it's stored as 5000000 (approx). So your calculation in the trigger must assume the actual stored value, not the display including the M for mega.

    so look at the actual values and base your trigger on that. Then when traffic goes from 50Mbps to 800Kbps, the usage will go from 5% to 0.08%.

    Since you specified your trigger at 75%, this drop will not make the trigger fire.

    Comment

    • asteroidyorkton
      Member
      • Aug 2016
      • 53

      #3
      Originally posted by peatb
      You're mixing up units here.
      Even though zabbix displays it in the graph as "50MBps", in the database it's stored as 5000000 (approx). So your calculation in the trigger must assume the actual stored value, not the display including the M for mega.

      so look at the actual values and base your trigger on that. Then when traffic goes from 50Mbps to 800Kbps, the usage will go from 5% to 0.08%.

      Since you specified your trigger at 75%, this drop will not make the trigger fire.
      Okay i get it now.
      So it should look like I should use ifInOctets / ifHighSpeed * 1024 (once or twice?)
      ifHighSpeed is 1000
      Last edited by asteroidyorkton; 11-03-2017, 16:15.

      Comment

      • peatb
        Zabbix Certified Trainer
        Zabbix Certified Trainer
        Zabbix Certified SpecialistZabbix Certified Professional
        • Aug 2016
        • 36

        #4
        Again I'm guessing units. If I check on one of my systems:

        IF-MIB::ifInOctets.2 = Counter32: 1379715791
        IF-MIB::ifHighSpeed.2 = Gauge32: 1000

        The highspeed is obviously not given in bits but in megabit. So you must accomodate for that in your calculation (or set a custom multiplier in the highspeed item). Make sure that the units of all components is the same and you're not dividing bits by megabits.

        so ifInOctets/(ifHighSpeed*1024*1024) makes more sense.

        Comment

        • registration_is_lame
          Senior Member
          • Nov 2007
          • 148

          #5
          Hello, What should be changed if I'm using IfHCInOctects (64 bit counters?)

          Bandwidth reported is too high 400 Tbps.

          Item OID - IfHCInOctects
          Custom multiplier - 8
          units - bps

          Update: I'm guessing it happens only once - false bandwidth after changing from IfInOctects to IfHcOctects? I started seeing resolved alerts and bandwidth going down back to normal
          Last edited by registration_is_lame; 22-03-2017, 10:56.

          Comment

          Working...