[openstack-dev] [Ceilometer] Meter-list with multiple filters in simple query is not working

Eoghan Glynn eglynn at redhat.com
Mon Oct 12 11:37:35 UTC 2015

> Hi
> Can anyone plz help me on how to specify a simple query with multiple values
> for a query field in a Ceilometer meter-list request? I need to fetch meters
> that belongs to more than one project id. I have tried the following query
> format, but only the last query value (in this case, project_id=
> d41cdd2ade394e599b40b9b50d9cd623) is used for filtering. Any help is
> appreciated here.
> curl -H 'X-Auth-Token:<token>'
> http://localhost:8777/v2/meters?q.field=project_id&q.op=eq&q.value=f28d2e522e1f466a95194c10869acd0c&q.field=project_id&q.op=eq&q.value=d41cdd2ade394e599b40b9b50d9cd623
> Thanks
> Srikanth

By "not working" you mean "not doing what you (incorrectly) expect it to do"

Your query asks for samples with aproject_id set to *both* f28d.. *and* d41c..
The result is empty, as a sample can't be associated with two project_ids.

The ceilometer simple query API combines all filters using logical AND.

Seems like you want logical OR here, which is possible to express via complex



More information about the OpenStack-dev mailing list