Custom Search

Monday, May 19, 2014

OpenStack Ceilometer How To Use and Debug MongoDB

a)
* Goto mongodb shell

#mongo

b)
* List all databases

> show dbs
admin       (empty)
ceilometer  0.078GB
local       0.078GB
>

c)
* Switch to "ceilometer database"

> use ceilometer
switched to db ceilometer
>

d)
* Get number of samples that have been collected.You should get a number greater than 0.
* Understand "meter" and "resource".


d1)
* Meter : The measurements tracked for a resource. For example, an instance has a number of meters, such as duration of instance, CPU time used, number of disk io requests, etc. Three types of meters are defined in ceilometer:
Cumulative: Increasing over time (e.g. disk I/O)
Gauge: Discrete items (e.g. floating IPs, image uploads) and fluctuating values (e.g. number of Swift objects)
Delta: Incremental change to a counter over time (e.g. bandwidth delta)

http://docs.openstack.org/developer/ceilometer/glossary.html

> db.meter.stats().count
0
>
>

d2)
* Resource : The OpenStack entity being metered (e.g. instance, volume, image, etc).

http://docs.openstack.org/developer/ceilometer/glossary.html

> db.resource.stats().count

0
>

e)
* Get information for one sample.

> db.meter.findOne()
null
>
>
> db.resource.findOne()
null
>

f)
* Get lists all the other MongoDB collections

> show collections
meter
resource
system.indexes
>

g)
* To list all the defined indexes.

> db.system.indexes.find()
{ "v" : 1, "key" : { "_id" : 1 }, "name" : "_id_", "ns" : "ceilometer.resource" }
{ "v" : 1, "key" : { "user_id" : 1, "source" : 1 }, "name" : "resource_idx", "ns" : "ceilometer.resource" }
{ "v" : 1, "key" : { "_id" : 1 }, "name" : "_id_", "ns" : "ceilometer.meter" }
{ "v" : 1, "key" : { "resource_id" : 1, "user_id" : 1, "counter_name" : 1, "timestamp" : 1, "source" : 1 }, "name" : "meter_idx", "ns" : "ceilometer.meter" }
{ "v" : 1, "key" : { "timestamp" : -1 }, "name" : "timestamp_idx", "ns" : "ceilometer.meter" }
>





http://terriyu.info/blog/posts/2013/07/installing-devstack-ceilometer/ <=== IMP

http://docs.openstack.org/developer/ceilometer/glossary.html <==== IMP

http://docs.openstack.org/developer/ceilometer/install/development.html

http://openstack.redhat.com/CeilometerQuickStart <===IMP


No comments:

Post a Comment