Meter type of hardware bandwidth should be GAUGE

Bug #1326723 reported by Lawrance
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ceilometer
Fix Released
Medium
Lawrance

Bug Description

When i check the hardware network bandwidth metering code, the oid it walks is "1.3.6.1.2.1.2.2.1.5" i find it use TYPE_CUMULATIVE, code is below:

class BandwidthBytesPollster(_Base):

    @staticmethod
    def generate_one_sample(host, c_data):
        (nic, info) = c_data
        return util.make_sample_from_host(host,
                                          name='network.bandwidth.bytes',
                                          type=sample.TYPE_CUMULATIVE,
                                          unit='B',
                                          volume=info.bandwidth,
                                          res_metadata=nic,
                                          )

but when i review net-snmp.org,i find the link:
http://www.net-snmp.org/docs/mibs/interfaces.html

the oid "1.3.6.1.2.1.2.2.1.5" is representing ifSpeed and the type is GAUGE, should it use TYPE_GAUGE?

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to ceilometer (master)

Fix proposed to branch: master
Review: https://review.openstack.org/98075

Changed in ceilometer:
assignee: nobody → Lawrance (jing)
status: New → In Progress
Revision history for this message
Lawrance (jing) wrote :

maybe the CUMULATIVE TYPE is right!

Revision history for this message
gordon chung (chungg) wrote :
Revision history for this message
Lawrance (jing) wrote :

as decribed in http://docs.openstack.org/developer/ceilometer/measurements.html

Cumulative Increasing over time (instance hours)

but the hardware.network.bandwidth.bytes is not Increasing over time
| localhost | hardware.network.bandwidth.bytes | cumulative | 0.0 | B | 2014-06-04T12:36:15 |
| localhost | hardware.network.bandwidth.bytes | cumulative | 0.0 | B | 2014-06-04T12:36:15 |
| localhost | hardware.network.bandwidth.bytes | cumulative | 1250000.0 | B | 2014-06-04T12:36:15 |
| localhost | hardware.network.bandwidth.bytes | cumulative | 0.0 | B | 2014-06-04T12:36:15 |
| localhost | hardware.network.bandwidth.bytes | cumulative | 0.0 | B | 2014-06-04T12:36:15 |
| localhost | hardware.network.bandwidth.bytes | cumulative | 536870911.0 | B | 2014-06-04T12:36:15 |
| localhost | hardware.network.bandwidth.bytes | cumulative | 536870911.0 | B | 2014-06-04T12:36:15 |
| localhost | hardware.network.bandwidth.bytes | cumulative | 1250000.0 | B | 2014-06-04T12:36:15 |
| localhost | hardware.network.bandwidth.bytes | cumulative | 1250000.0 | B | 2014-06-04T12:26:16 |
| localhost | hardware.network.bandwidth.bytes | cumulative | 125000000.0 | B | 2014-06-04T12:26:16 |
| localhost | hardware.network.bandwidth.bytes | cumulative | 125000000.0 | B | 2014-06-04T12:26:16 |
| localhost | hardware.network.bandwidth.bytes | cumulative | 0.0 | B | 2014-06-04T12:26:16 |
| localhost | hardware.network.bandwidth.bytes | cumulative | 0.0 | B | 2014-06-04T12:26:16 |
| localhost | hardware.network.bandwidth.bytes | cumulative | 0.0 | B | 2014-06-04T12:26:16 |
| localhost | hardware.network.bandwidth.bytes | cumulative | 0.0 | B | 2014-06-04T12:26:16 |
| localhost | hardware.network.bandwidth.bytes | cumulative | 1250000.0 | B | 2014-06-04T12:26:16 |
| localhost | hardware.network.bandwidth.bytes | cumulative | 0.0 | B | 2014-06-04T12:26:16 |
| localhost | hardware.network.bandwidth.bytes | cumulative | 0.0 | B | 2014-06-04T12:26:16 |
| localhost | hardware.network.bandwidth.bytes | cumulative | 536870911.0 | B | 2014-06-04T12:26:16 |
| localhost | hardware.network.bandwidth.bytes | cumulative | 536870911.0 | B | 2014-06-04T12:26:16 |
| localhost | hardware.network.bandwidth.bytes | cumulative | 1250000.0 | B | 2014-06-04T12:26:16 |
| localhost | hardware.network.bandwidth.bytes | cumulative | 1250000.0 | B | 2014-06-04T12:26:16 |
| localhost | hardware.network.bandwidth.bytes | cumulative | 125000000.0 | B | 2014-06-04T12:26:16 |
| localhost | hardware.network.bandwidth.bytes | cumulative | 125000000.0 | B | 2014-06-04T12:26:16 |
| localhost | hardware.network.bandwidth.bytes | cumulative | 0.0 | B | 2014-06-04T12:26:16 |
| localhost | hardware.network.bandwidth.bytes | cumulative | 0.0 | B | 2014-06-04T12:26:16 |

Revision history for this message
gordon chung (chungg) wrote :

hi Lawrance,

just to clarify. you think it should be gauge and not cumulative right?

Changed in ceilometer:
importance: Undecided → Medium
Lianhao Lu (lianhao-lu)
Changed in ceilometer:
milestone: none → juno-1
Eoghan Glynn (eglynn)
Changed in ceilometer:
milestone: juno-1 → juno-2
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to ceilometer (master)

Reviewed: https://review.openstack.org/98075
Committed: https://git.openstack.org/cgit/openstack/ceilometer/commit/?id=d7c2144a9ab0b0bc5d35aa6a24f01b9fcfd90ece
Submitter: Jenkins
Branch: master

commit d7c2144a9ab0b0bc5d35aa6a24f01b9fcfd90ece
Author: liuqing <jing.liuqing@99cloud.net>
Date: Thu Jun 5 17:54:42 2014 +0800

    Use TYPE_GAUGE rather than TYPE_CUMULATIVE

    For hardware network bandwidth metering, it uses TYPE_CUMULATIVE, but
    the oid "1.3.6.1.2.1.2.2.1.5"(in file ceilometer/hardware/inspector/snmp.py)
    it walks in net-snmp.org is representing ifSpeed and the type is GAUGE.

    Cumulative definition: Increasing over time, but when i run
    `ceilometer sample-list --meter hardware.network.bandwidth.bytes`
    the output is not increasing over time.

    reference:
    http://docs.openstack.org/developer/ceilometer/measurements.html
    http://www.net-snmp.org/docs/mibs/interfaces.html

    Change-Id: Ic8a8280695c25db103fe4e4592fe00622728655d
    Closes-Bug: #1326723

Changed in ceilometer:
status: In Progress → Fix Committed
Changed in ceilometer:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in ceilometer:
milestone: juno-2 → 2014.2
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.