Uploaded image for project: 'Observium'
  1. Observium
  2. OBS-4745

traffic accounting bug in case interface has only one direction traffic

Details

    • Bug
    • Resolution: Fixed
    • Major
    • None
    • Professional Edition
    • Billing
    • Debian 6.1.69-1 (2023-12-30) x86_64 GNU/Linux

    Description

      poll-billing.php line 152:

       

      if ($in_delta == $data['in'] || $in_delta == $data['in']) {
                      // Deltas are equal to counters. Clearly fail.
                      echo("Deltas equal counters. Resetting.");
                      $in_delta  = 0;
                      $out_delta = 0;
      }
      

       

      Assumption (at least for our use case) is wrong. But also the logic implemented - referring twice to same condition (could be just a typo).

      For example we use a lot of Cisco Nexus brokers (basically nexus switch in tap mode), but it is same for any passive collection - you can have ports which have only packets flowing in a single direction.

      Anyhow this is my simple proposal for a fix, instead of code above (for sure could be further optimized):

       

                  if ($in_delta == $data['in']) {
                      // Deltas are equal to counters. Clearly fail.
                      echo("In Deltas equal counters. Resetting.");
                      $in_delta  = 0;
                  }
                  if ($out_delta == $data['out']) {
                      // Deltas are equal to counters. Clearly fail.
                      echo("Out Deltas equal counters. Resetting.");
                      $out_delta  = 0;
                  }
      

       

       

      Version info:

      Path: stable
      URL: https://svn.observium.org/svn/observium/branches/stable
      Relative URL: ^/observium/branches/stable
      Repository Root: https://svn.observium.org/svn
      Repository UUID: 61d68cd4-352d-0410-923a-c4978735b2b8
      Revision: 13283
      Node Kind: directory
      Last Changed Author: adama
      Last Changed Rev: 13242
      Last Changed Date: 2024-01-02 14:44:46 +0000 (Tue, 02 Jan 2024)

      Attachments

        Activity

          [OBS-4745] traffic accounting bug in case interface has only one direction traffic

          Hi Mike, thank you. 

          Will check soon.

          jdjurici Josip Duricic added a comment - Hi Mike, thank you.  Will check soon.
          landy Mike Stupalov made changes -
          Assignee Original: Adam Armstrong [ adama ] New: Mike Stupalov [ landy ]
          Issue Type Original: Vendor Bug [ 10000 ] New: Bug [ 1 ]
          Resolution New: Fixed [ 1 ]
          Status Original: Pending Response [ 10000 ] New: Resolved [ 5 ]

          Thanks, fixed in r13285.

          Will be in next stable soon.

          landy Mike Stupalov added a comment - Thanks, fixed in r13285. Will be in next stable soon.
          bot Observium Bot made changes -
          Status Original: Open [ 1 ] New: Pending Response [ 10000 ]
          jdjurici Josip Duricic created issue -

          General questions and device support can be discussed in our Discord channel, click here to join.


          Please make and attach additional information about the device:

          • full snmp dump from device:

            snmpwalk -v2c -c <community> -t 3 -Cc --hexOutputLength=0 -Ih -ObentxU <hostname> .1 > myagent.snmpwalk
            snmpwalk -v2c -c <community> -t 3 -Cc --hexOutputLength=0 -Ih -ObentxU <hostname> .1.3.6.1.4.1 >> myagent.snmpwalk

            If device not support SNMP version 2c, replace -v2c with -v1.

          • If you have problems with discovery or poller processes, please do and attach these debugs:

            ./discovery.php -d -h <device>
            ./poller.php -d -h <device>

          • additionally attach device and/or vendor specific MIB files

          This comment is added automatically.

          bot Observium Bot added a comment - General questions and device support can be discussed in our Discord channel, click here to join . Please make and attach additional information about the device: full snmp dump from device: snmpwalk -v2c -c <community> -t 3 -Cc --hexOutputLength=0 -Ih -ObentxU <hostname> .1 > myagent.snmpwalk snmpwalk -v2c -c <community> -t 3 -Cc --hexOutputLength=0 -Ih -ObentxU <hostname> .1.3.6.1.4.1 >> myagent.snmpwalk If device not support SNMP version 2c, replace -v2c with -v1. If you have problems with discovery or poller processes, please do and attach these debugs: ./discovery.php -d -h <device> ./poller.php -d -h <device> additionally attach device and/or vendor specific MIB files This comment is added automatically.

          People

            landy Mike Stupalov
            jdjurici Josip Duricic
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: