[Openstack] ceilometer question: metering number of running instances

Eoghan Glynn eglynn at redhat.com
Tue Dec 9 12:41:55 UTC 2014


> Hi all,
> 
> I'm looking for a way of how to meter the number of running instances (per
> tenant).
> 
> Currently, the Sum value in ceilometer statistics command's output is
> confusing, mostly because the high number of notifications generated by nova
> for each instance. As a result, also the graph in Resource Usage view does
> not
> seem really useful at least for 'instances' meter.
> 
> (See https://bugs.launchpad.net/ceilometer/+bug/1396257 for this problem)
> 
> So, what is the correct way? Should I group the statistics output by
> resource_id like
> 
> ceilometer statistics -m instance -q 'timestamp>2014-12-03T00' -g resource_id

You could use the new selectable cardinality aggregate added in icehouse,
e.g.

  ceilometer statistics -a 'cardinality<-resource_id' \
    -m instance -q 'timestamp>2014-12-03T00:00:00'

which counts the number of distinct value of a particular attribute
within the matching samples (in this cse, the instance UUID).

Cheers,
Eoghan

> and just count the number of resources in this output, which should (?) be
> the
> number of running instances?
> 
> Jiri
> 
> --
> Jiri Suchomel
> 
> SUSE LINUX, s.r.o.
> Lihovarsk√° 1060/12
> tel: +420 284 028 960
> 190 00 Praha 9, Czech Republic                http://www.suse.cz
> 
> 
> _______________________________________________
> Mailing list: http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack
> Post to     : openstack at lists.openstack.org
> Unsubscribe : http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack
>




More information about the Openstack mailing list