[Openstack] [Ceilometer] filter event samples

Alessandro Barabesi abarabesi at enter.it
Tue Aug 6 17:01:30 UTC 2013


Hi everybody,

is there a way to avoid event samples from list of samples and statistics?

I use statistics to measure the time a group of resources has existed.

For example, in order to measure how many instances of a given flavor existed in a day I use the following query

http://10.10.10.10:8777/v2/meters/instance:flavor/statistics

{
        "q": [{
                "field": "project_id",
                "op": "eq",
                "value": "cdac83aebbfa45498856fe1fb26378ff"
        },
        {
                "field": "timestamp",
                "op": "ge",
                "value": "2013-08-01T00:00:00"
        },
        {
                "field": "timestamp",
                "op": "lt",
                "value": "2013-08-02T00:00:00"

        }]
}

The "count" (or "sum") value returned will give me the instances per minute, which I use for billing.

The problem is that statistics count all samples therefore all event samples contribute to the values
returned, which is not good for what I need to do (there is at least one 'compute.instance.exists' sample
per instance per hour plus other possible events). So it would be great if I could avoid event samples.


Thanks
Alex





More information about the Openstack mailing list