Ceilometer compared to other OpenStack projects, the difference in deployment is that Ceilometer can choose from a number of different background databases to store measurements and warnings.
The current background database supported by Ceilometer and its corresponding configuration are shown in table 9-5:
Table 9-5 Ceilometer supported back-end databases
Database |
Configuration Item Example |
Description |
Mongodb |
[Database] Connection = Mongodb://user:[email Protected]:27017/ceilometer |
Requires MongDB2.4 and later versions |
relational database supported by SQLAlchemy |
[Database] connection= Mysql://user:[email Protected]/ceilometer?charset=utf8 |
Need to run Ceilometer-dbsync to create a database |
HBase |
[Database] Connection = hbase://hbase-thrift-host:9090 |
Ceilometer using the Happybase library to communicate via the HBase thrift interface and the background hbase database |
DB2 |
[Database] Connection = Db2://user:[email Protected]:27017/ceilometer |
|
In the Juno version, it is supported to store measurements and warnings in different database backgrounds, and administrators can use the following example of configuration items:
# Here are some of the configurations in/etc/ceilometer/ceilometer.conf
[Database]
# Use MongoDB to save measured values
Metering_connection = Mongodb://user:[email Protected]:27017/ceilometer
# Use PostgreSQL to save the warning
Alarm_connection = Postgresql://user:[email Protected]/ceilometer
The features supported by the different database backgrounds in the Ceilometer also vary, as shown in table 9-6:
Table 9-6 Ceilometer Supported background database feature comparison
Function |
Mongodb |
relational database supported by SQLAlchemy |
HBase |
DB2 |
Measured value |
Basic Query |
U |
U |
U |
U |
Metadata-based queries |
U |
U |
U |
U |
Measurement sampling |
Basic Query |
U |
U |
U |
U |
Metadata-based queries |
U |
U |
U |
U |
User-defined complex queries |
U |
U |
Û |
U |
Collection statistics |
Basic Query |
U |
U |
U |
U |
Metadata-based queries |
U |
U |
U |
U |
Support GroupBy operation |
U |
U |
Û |
U |
Support for basic statistics operations: Max/min/avg/count/sum |
U |
U |
U |
U |
Supports standard variance statistics |
U |
U |
Û |
Û |
Support Cardinality (cardinality) operation |
U |
U |
Û |
Û |
Support Warning Device (ALARM) |
U |
U |
U |
Û |
9.2.2 Installation
my_mongodb_0:primary> use ceilometermy_mongodb_0:primary> db.adduser ({User: "Ceilometer", pwd: " Ceilometerpassword ", Roles: [" ReadWrite "," DbAdmin "]})
Restart Ceilometer Services:
$ sudo service ceilometer-agent-central restart$ sudo service ceilometer-api restart$ sudo service ceilometer-collector re Start
Http://www.severalnines.com/blog/openstack-metering-how-install-ceilometer-mongodb
Ceilometer Database Comparison