[openstack-dev] [ceilometer] resource_metadata and metaquery

Sandy Walsh sandy.walsh at rackspace.com
Wed Jan 23 17:24:28 UTC 2013



On 01/23/2013 01:15 AM, Lu, Lianhao wrote:
> Hi guys,
> 
> If my understanding is correct, the current resource_metadata stored by the ceilometer collector could be any python object which can be serialized to the JSON format, so the resource_metadata could be a dict containing values of dict/list/string, e.g. 
> 
>   {"key1": [ 
>           { "key11": 11},
>           { "key12": 12}
>          ],
>    "key2": "v2"
>    "key3": {
>         "key31": 31
>        }
>   }
> 
> Does the metaquery support complex conditions, like the form of metadata["key3"]["key31"] > 30 or { "key11": 11} in metadata["key1"], besides the simple form of metadata["key2"]=="v2"? 
> 
> Besides, supporting the metaquery in sqlalchemy is not easy as that in mongodb. The question is where should the query filter operation happen? We may do the metadata query filter operation on the sqlalchemy client side in python, which is comparably easy to implement and easy to be adapted to complex filter conditions, but is bad in performance because it needs to get all the records from backend DB to do that. 
> 
> The other way is to do the metadata query filter operation on the backend DB side which should have better performance, but I don't know how to do that to support complex conditions other than the simple form of metadata["key2"]=="v2".
> 
> Any comment?

Hi Lianhao,

We need this functionality as well. Of the functionality we need added
(http://wiki.openstack.org/RaxCeilometerRequirements ) the first point
touches on this topic (details here http://wiki.openstack.org/RichMeters )

An example of some of the queries we need to be able to run can be seen
in the StackTach controller:
https://github.com/rackspace/stacktach/blob/master/stacktach/stacky_server.py

I'd be interested in discussing how we can make this happen as it's the
piece I'm working on next.

Thanks
-Sandy


> Best Regards,
> -Lianhao
> 
> _______________________________________________
> OpenStack-dev mailing list
> OpenStack-dev at lists.openstack.org
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
> 



More information about the OpenStack-dev mailing list