Ad Widget

Collapse

Help with trigger math...

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ptera
    Senior Member
    • Oct 2014
    • 109

    #1

    Help with trigger math...

    Working with Template SNMP Network Device I have been able to solve the graphing issue with 64 bit counters for GIG interfaces. But the math for the Congestion Triggers eludes me.
    8*
    {Template SNMP Network Device 64bit Interfaces:ifHCInOctets[{#SNMPVALUE}].last(0)}
    /
    {Template SNMP Network Device 64bit Interfaces:ifSpeed[{#SNMPVALUE}].last(0)}
    >0.8

    So using snmpget on interface 9 yeilds
    IF-MIB::ifHCInOctets.8 = Counter64: 82214248573150
    IF-MIB::ifSpeed.8 = 1000000000

    8*82214248573150/1000000000>0.8
    Divide has priority then multiply and then greater than

    First
    82214248573150/1000000000=82214.14857315
    82214.14857315*8=657713.1885852
    657713.1885852>0.8

    Answer True - I get congestion issues all the time.
    but there is only 82Mbps traffic on a GIG link. ????
    The graph shows it has never gone higher than 122Mbps

    This makes no sense to me....
    Last edited by ptera; 27-11-2014, 02:21.
  • BDiE8VNy
    Senior Member
    • Apr 2010
    • 680

    #2
    Did you have double checked the items raw history values, as the history graph uses avg() function and might suppress peaks?
    You could also think of temporarily creating an action that considers events of this trigger and sends you an email (with the pre-defined macros set for item values):

    Code:
    [...]
    1. {ITEM.NAME1} ({HOST.NAME1}:{ITEM.KEY1}): {ITEM.VALUE1}
    2. {ITEM.NAME2} ({HOST.NAME2}:{ITEM.KEY2}): {ITEM.VALUE2}
    [...]

    Comment

    • ptera
      Senior Member
      • Oct 2014
      • 109

      #3
      Trigger: .ONB-OSPF.ptera.net Interface GigabitEthernet1/9 Outbound Congestion
      Trigger status: PROBLEM
      Trigger severity: Warning
      Trigger URL:

      Item values:

      1. Outgoing traffic on interface GigabitEthernet1/9 (.ONB-OSPF.ptera.net:ifHCOutOctets[GigabitEthernet1/9]): 109.02 Mbps

      2. Interface speed of interface GigabitEthernet1/9 (.ONB-OSPF.ptera.net:ifSpeed[GigabitEthernet1/9]): 1 Gbps

      So 109.02 Mbps is more than 1 Gbps ?!?

      Comment

      • evertonco
        Member
        • Aug 2014
        • 75

        #4
        You're comparing different things.

        The common use of Octets is store delta value (82Mbps), not absolute value (82214248573150).

        Just use an expression like: (ifInHCOctets/ifSpeed)>0.8
        Last edited by evertonco; 02-12-2014, 03:54.

        Comment

        • BDiE8VNy
          Senior Member
          • Apr 2010
          • 680

          #5
          No, it means the value of the first occurred item is 109.02 Mbps and of the second is 1 Gbps.
          This shows that the first item correctly stores the delta of F-MIB::ifHCInOctets (as it is a counter)

          Btw, multiplication and devision has equal priority. See Trigger expressions

          Edit:
          Huh! I should probably not save a post when have been away for awhile since writing
          Do what evertonco suggested.
          Last edited by BDiE8VNy; 02-12-2014, 04:42.

          Comment

          • ptera
            Senior Member
            • Oct 2014
            • 109

            #6
            Using the default template trigger prototype

            Just use an expression like: (ifInHCOctets/ifSpeed)>0.8
            Code:
            8*{Template SNMP Network Device 64bit Interfaces:
            [B][I]ifHCInOctets[/I][/B][{#SNMPVALUE}].last(0)}/{Template SNMP Network Device 64bit Interfaces:
            [B][I]ifSpeed[/I][/B][{#SNMPVALUE}].last(0)}>0.8
            This looks like to me it is using what you described.

            The only change I made to the original was the HC for 64bit counters

            Code:
            8*{Template SNMP Network Device 
            Interfaces:ifInOctets[{#SNMPVALUE}].last()}/{Template SNMP Network Device
             Interfaces:ifSpeed[{#SNMPVALUE}].last()}>0.8

            Comment

            • ptera
              Senior Member
              • Oct 2014
              • 109

              #7
              Correction to my question

              It should have been....

              So 109.02 Mbps is more than 80% of 1 Gbps ?!?

              Yes the Item prototype (Numeric (float)) for Incoming traffic on interface $1 is stored as Delta (speed per second)
              And the Item prototype (Numeric (unsigned)) for Interface speed of interface $1 is stored As is

              Is that the issue?
              Or is it the multiplying by 8?
              Last edited by ptera; 03-12-2014, 03:09. Reason: 2nd look

              Comment

              • ptera
                Senior Member
                • Oct 2014
                • 109

                #8
                Or is it the multiplying by 8?

                Or is it the multiplying by 8?

                That is what it was - switch to HC do not use multiply by 8.

                Comment

                • aib
                  Senior Member
                  • Jan 2014
                  • 1615

                  #9
                  Sorry about general notes.
                  Speed of interface(ifSpeed) - 1 gigabit per second.
                  Traffic on interface(ifHCInOctets) - in Megabit per second.

                  To compare traffic and speed you have to use expression:
                  (ifHCInOctets/ifSpeed) > 0.8

                  When you multiply ifHCInOctets * 8 you are getting a speed in MegaByte per second and your expression is wrong. You cannot use comparisation of Bytes and Bites in one formula.
                  Sincerely yours,
                  Aleksey

                  Comment

                  Working...