Filtering by counter_volume is not working
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Ceilometer |
Opinion
|
Low
|
Jia Dong |
Bug Description
counter_volume doesn't seem to be among the fields allowed in query filters.
Example:
GET http://
{
"q": [{
"field": "project_id",
"op": "eq",
"value": "77b461539c8542
},
{
"field": "timestamp",
"op": "ge",
"value": "2013-07-
},
{
"field": "timestamp",
"op": "lt",
"value": "2013-07-
},
{
"field": "counter_volume",
"op": "eq",
"value": "1024"
}]
}
response:
{
"error_message": "{\"debuginfo\": null, \"faultcode\": \"Client\", \"faultstring\": \"Unknown argument: \\\"counter_
}
If other operators are used instead of "eq" there is no error message but the results are wrong
Example:
GET http://
{
"q": [{
"field": "project_id",
"op": "eq",
"value": "77b461539c8542
},
{
"field": "timestamp",
"op": "ge",
"value": "2013-07-
},
{
"field": "timestamp",
"op": "lt",
"value": "2013-07-
},
{
"field": "counter_volume",
"op": "gt",
"value": "1024"
}]
}
response:
[{
"counter_name": "storage.
"user_id": null,
"resource_id": "77b461539c8542
"timestamp": "2013-07-
"resource_
},
"source": "openstack",
"counter_unit": "B",
"counter_volume": 0.0,
"project_id": "77b461539c8542
"message_id": "b0e3606c-
"counter_type": "gauge"
},
{
"counter_name": "storage.
"user_id": null,
"resource_id": "77b461539c8542
"timestamp": "2013-07-
"resource_
},
"source": "openstack",
"counter_unit": "B",
"counter_volume": 0.0,
"project_id": "77b461539c8542
"message_id": "d49c4ef6-
"counter_type": "gauge"
}]
Changed in ceilometer: | |
assignee: | nobody → xingzhou (xingzhou) |
status: | New → Confirmed |
Changed in ceilometer: | |
importance: | Undecided → Low |
Changed in ceilometer: | |
assignee: | nobody → Jia Dong (jiadong-jia) |
xingzhou, are you still looking at this? if you are, i think you should implement it similar to timestamp filter (as a range). it'll probably be more useful than searching for an exact volume.
if you aren't looking at it, i can take it over... i think.