groupby ability on resource metadata

Bug #1331508 reported by gordon chung
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ceilometer
Fix Released
Wishlist
Lena Novokshonova

Bug Description

it would be useful to have groupby functionality to derive meters such as:

- query latest cpu_util for all instances
- meter similar to current meter:
instance:<type> g instance inst ID both 1, 2, 3 Existence of instance <type> (openstack types)

Eoghan Glynn (eglynn)
Changed in ceilometer:
status: New → Triaged
milestone: none → next
Dina Belova (dbelova)
Changed in ceilometer:
assignee: nobody → Lena Novokshonova (enovokshonova)
Revision history for this message
Lena Novokshonova (enovokshonova) wrote :

Hello, Gordon! May you explain what in your understanding similar meter? Is it right only for 'instance:*' meters or we can consider, 'meter.*' similar, for example image.update and image.upload?
And what do you mean about cpu_util? Is it may be group by resource_id?

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

@Lena

i believe the use case i was originally thinking of was to get the cpu_util value grouped by instance (which is a metadata value).

ie. something similar to the following (the sql below is most likely invalid):
select meter.cpu_util
from meter
join sample on meter.id = sample.meter_id
left outer join metadata_text on metadata_text.id = sample.resource_id
where metadata_text.key = 'instance_id'
groupby metadata_text.value

similarly, the original use case for the instance:<type> meter was because we could not build queries using the metadata. see:
https://review.openstack.org/#/c/40234/

Revision history for this message
Lena Novokshonova (enovokshonova) wrote :

Gordon, please take a look on the https://github.com/openstack/ceilometer/blob/master/ceilometer/compute/pollsters/util.py#L37 - this method is creating metadata from instance. But there is not any instance_id put in the metadata, and in cpu pollsters instance_id is used as resource_id by https://github.com/openstack/ceilometer/blob/master/ceilometer/compute/pollsters/util.py#L89 method
I can't find where instance_id puts to metadata, may you help me?

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

i apologise Lena, i'm not sure why i typed instance_id there. i meant instance_type...

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

Related fix proposed to branch: master
Review: https://review.openstack.org/137626

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

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

commit 15d01c2ff27df7566097d42d8709b8b1732ef74e
Author: Lena Novokshonova <email address hidden>
Date: Thu Nov 27 15:34:06 2014 +0400

    [MongoDB] Add groupby ability on resource_metadata

    It would be useful to have groupby functionality to derive meters
    by their resource_metadata. This commit adds groupby by
    resource_metadata.instance_type for mongodb.

    Change-Id: I26e7fb4fa2835d283cb6c83e0aec2dba4ac9bf00
    Partially-Closes-Bug: 1331508

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/141389

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

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

commit f1439a1fe467525ac24039048350f8c6105ad93c
Author: Lena Novokshonova <email address hidden>
Date: Fri Dec 12 17:41:45 2014 +0400

    [SQLalchemy] Add groupby ability resource_metadata

    It would be useful to have groupby functionality to derive meters
    by their resource_metadata. This commit adds groupby by
    resource_metadata.instance_type for sqlalchemy.

    Change-Id: I568b5ca3d84371c4fd3bbdfed7b3e801164dbc5e
    Partially-Closes-Bug: 1331508

gordon chung (chungg)
Changed in ceilometer:
status: Triaged → Fix Released
milestone: next → none
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers