image properties are in the database the query works, it return only sample with metadata.properties.toto=toto but the returned json don't have this metadata
Same query in mongo:
MongoDB shell version: 2.4.5 connecting to: ceilometer > db.meter.findOne({'counter_name':'image', 'resource_metadata.properties.toto':'toto'}) { "_id" : ObjectId("51ed36f8eb0a1975fedb9620"), "counter_name" : "image", "user_id" : null, "message_signature" : "fe9515719b66d0840db5ed5f58834389ee13a7c0c8caf711cc2dbd9aa90aeede", "timestamp" : ISODate("2013-07-22T13:43:20Z"), "resource_id" : "aa4a7285-986b-4dff-bd59-bf7f9665b109", "resource_metadata" : { "status" : "active", "name" : "cirros-0.3.1-x86_64-uec", "deleted" : false, "container_format" : "ami", "created_at" : "2013-07-22T07:40:58", "disk_format" : "ami", "updated_at" : "2013-07-22T09:24:12", "properties" : { "kernel_id" : "38dd825b-3b08-4cb2-9f1c-76b207c74f0e", "ramdisk_id" : "705c0c2a-2d3e-4da4-8740-4382bb56f8f6", "toto" : "toto" }, "protected" : false, "checksum" : "f8a2eeee2dc65b3d9b6e63678955bd83", "min_disk" : 0, "is_public" : true, "deleted_at" : null, "min_ram" : 0, "size" : 25165824 }, "source" : "openstack", "counter_unit" : "image", "counter_volume" : 1, "project_id" : "a61f3c429ef5401d82d0e6b59fb276a4", "message_id" : "abfc6cc6-f2d4-11e2-ac72-00163ef7ca5e", "counter_type" : "gauge" }
image properties are in the database properties. toto=toto but the returned json don't have this metadata
the query works, it return only sample with metadata.
Same query in mongo:
MongoDB shell version: 2.4.5 findOne( {'counter_ name':' image', 'resource_ metadata. properties. toto':' toto'}) "51ed36f8eb0a19 75fedb9620" ), signature" : "fe9515719b66d0 840db5ed5f58834 389ee13a7c0c8ca f711cc2dbd9aa90 aeede", "2013-07- 22T13:43: 20Z"), 986b-4dff- bd59-bf7f9665b1 09", metadata" : { 0.3.1-x86_ 64-uec" , format" : "ami", 22T07:40: 58", 22T09:24: 12", 3b08-4cb2- 9f1c-76b207c74f 0e", 2d3e-4da4- 8740-4382bb56f8 f6", 3d9b6e63678955b d83", 1d82d0e6b59fb27 6a4", f2d4-11e2- ac72-00163ef7ca 5e",
connecting to: ceilometer
> db.meter.
{
"_id" : ObjectId(
"counter_name" : "image",
"user_id" : null,
"message_
"timestamp" : ISODate(
"resource_id" : "aa4a7285-
"resource_
"status" : "active",
"name" : "cirros-
"deleted" : false,
"container_
"created_at" : "2013-07-
"disk_format" : "ami",
"updated_at" : "2013-07-
"properties" : {
"kernel_id" : "38dd825b-
"ramdisk_id" : "705c0c2a-
"toto" : "toto"
},
"protected" : false,
"checksum" : "f8a2eeee2dc65b
"min_disk" : 0,
"is_public" : true,
"deleted_at" : null,
"min_ram" : 0,
"size" : 25165824
},
"source" : "openstack",
"counter_unit" : "image",
"counter_volume" : 1,
"project_id" : "a61f3c429ef540
"message_id" : "abfc6cc6-
"counter_type" : "gauge"
}