counter_volume did not represent duration for instance,network,port, subnet, router,

Bug #1252988 reported by DongHuai Ren
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ceilometer
Fix Released
Low
Pradeep Kilambi

Bug Description

Test Steps
I use Web api to check the correction of ceilometer meters.

I find the counter_volume is 1, it did not change. It did not represent the duration of these meters.

Instance, network,subnet,port,router,ip.floating.

    "counter_volume": 1,

Test Investigation:

We find below code in the community. it seems the code set the volume=1 by default.

It did not consistent as the doc described.
http://docs.openstack.org/developer/ceilometer/measurements.html#

def process_notification(self, message):
        instance_type = message.get('payload', {}).get('instance_type')
        if instance_type:
            yield sample.Sample.from_notification(
                name='instance:%s' % instance_type,
                type=sample.TYPE_GAUGE,
                unit='instance',
                volume=1,

 process_notification(self, message):
        LOG.info('network notification %r', message)
        message['payload'] = message['payload'][self.resource_name]
        counter_name = getattr(self, 'counter_name', self.resource_name)
        unit_value = getattr(self, 'unit', self.resource_name)

        yield sample.Sample.from_notification(
            name=counter_name,
            type=sample.TYPE_GAUGE,
            unit=unit_value,
            volume=1,

Revision history for this message
Julien Danjou (jdanjou) wrote :

"I find the counter_volume is 1, it did not change. It did not represent the duration of these meters."

Volume is never a duration, it's a quantity. You want to compute duration, use the /statistics endpoint.

Changed in ceilometer:
status: New → Invalid
Revision history for this message
DongHuai Ren (rendh) wrote :

Hi Juline,

have you review with the doc ?
http://docs.openstack.org/developer/ceilometer/measurements.html#

In this doc

Name Type Unit Resource Origin Note
instance Gauge instance inst ID both Duration of instance
instance:<type> Gauge instance inst ID both Duration of instance <type> (openstack types)

Revision history for this message
Julien Danjou (jdanjou) wrote :

You are right, this documentation should be fixed. It's true that this meter are used most of the time to compute their duration, but the value is definitely not a time.

Changed in ceilometer:
status: Invalid → Confirmed
importance: Undecided → Low
milestone: none → icehouse-1
assignee: nobody → Julien Danjou (jdanjou)
Revision history for this message
DongHuai Ren (rendh) wrote :

Today I find Volume data not right eigher.Let me sum up here.

couter_volume {instance,instance:<type> ,network,port, subnet, router,ip.floating. volume . }

In this doc, they all described as Duration. I think we can change the doc. Or we add new function to support this beside statics.

Julien Danjou (jdanjou)
Changed in ceilometer:
milestone: icehouse-1 → icehouse-2
Julien Danjou (jdanjou)
Changed in ceilometer:
assignee: Julien Danjou (jdanjou) → nobody
milestone: icehouse-2 → icehouse-3
Changed in ceilometer:
assignee: nobody → Pradeep Kilambi (pkilambi)
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/69675

Changed in ceilometer:
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to ceilometer (master)

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

commit 65ae6da03cfa8e0806c63a1fd6aa3d3a63aa243c
Author: Pradeep Kilambi <email address hidden>
Date: Tue Jan 28 09:29:42 2014 -0800

    Fix measurement docs to correctly represent Existance meters

    There are various meters in the measurement docs that
    wrongly note the meter as Duration instead of its
    existance. The meters fixed include network, port,
    router, subnet, floating ip, volume.

    fixes bug #1252988

    Change-Id: I45a84769d6ee46d53e580ae08cbbf32ed20562b1

Changed in ceilometer:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in ceilometer:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in ceilometer:
milestone: icehouse-3 → 2014.1
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.