[openstack-dev] [Ceilometer][Gnocchi] Gnocchi cannot deal with combined resource-id ?

Chris Dent chdent at redhat.com
Fri Sep 11 16:47:20 UTC 2015


On Fri, 11 Sep 2015, Luo Gangyi wrote:

> I am using master branch and newest code for testing.
>
> For the purpose for learning the structure of gnocchi, I changed the
> default UUID type of mysql from binary to char, so I can easily link
> the resource-id(I mean in database), metric id and directory name of
> storing measures.
>
> When I did that, I found all the metrics where their resource id is
> combined(here, I mean in Ceilometer, such as instance-xxx-tapxxxx)
> have no measures stored.

In addition to the things that Julien has said, one thing that is
non-obvious about how gnocchi stores resources is that if the
incoming ID is _not_ a UUID then a uuid5 hash is created based on the id
provided. So if your resource has an ceilometer-side id of 'instance-xxx-
tapxxxx' it will be saved in the database in a form like 5B0A4989-44C3-46D1-A1ED-
4705062F51A2. The code review for that change is here:
https://review.openstack.org/#/c/216390/

With that change in place you can still use the 'instance-xxx-tapxxxx' ID
in the <id> part of /v1/metric/resource/<type>/<id> URLs and in
search queries.

But as pointed out elsewhere in the thread at least some of your
resources are missing because of the 'display_name' attribute being
dropped.

-- 
Chris Dent tw:@anticdent freenode:cdent
https://tank.peermore.com/tanks/cdent



More information about the OpenStack-dev mailing list