[openstack-dev] [Ceilometer]: Instance creation and deletion metrics in ceilometer !
Adrian Turjak
adriant at catalyst.net.nz
Thu Nov 3 00:10:49 UTC 2016
On 03/11/16 03:01, gordon chung wrote:
> gnocchi captures the state of a resource and it's history. this is
> accessible by looking at resource history. i'm not entirely sure if that
> handles your case, may you could provide the queries you use and we
> could figure out equivalent gnocchi queries. i built a ceilometer vs
> gnocchi usage deck[1] that may help but it's more focused on metrics
> rather than resource history.
>
> [1] http://www.slideshare.net/GordonChung/ceilometer-to-gnocchi
>
> cheers,
I'd need to double check exactly what query it is, but it effectively
amounts to:
"List all instance metric samples where project_id is <id> and timestamp
is in time range <start>-<end>"
The time range is an hour + leadin from last hour to catch the last
sample from the previous window.
We then group by resource id, and for each instance check the metadata.
If a sample exists, then the instance exists, and depending on what
states the metadata shows it was in we know for how much of that hour we
will be billing. Basically, we don't care about the actual volume/data
of the metric, just the sample metadata from the resource at that point
in time.
The above is what our billing aggregation service does ever hour against
ceilometer. So we're not using ceilometer directly for billing, just are
a source for the data we wish to aggregate and transform into something
we can bill.
It looks like we can still achieve the same thing in gnocchi with any
instance metric that has resource metadata (cpu_util) since gnocchi
stores the changes in the metadata over time. Can we though bypass the
metric and look at changes in resource metadata directly?
More information about the OpenStack-dev
mailing list