Telemetry provides an API service that provides a collector and a range of disparate agents. Before you can install these agents on nodes such as the compute node, you must use this procedure to install the core components on the controller node.
Install the Telemetry service on the controller node:
# apt-get install ceilometer-api ceilometer-collector ceilometer-agent-central \ ceilometer-agent-notification ceilometer-alarm-evaluator ceilometer-alarm-notifier python-ceilometerclient
The Telemetry service uses a database to store information. Specify the location of the database in the configuration file. The examples use a MongoDB database on the controller node:
# apt-get install mongodb-server
Note By default MongoDB is configured to create several 1 GB files in the
/var/lib/mongodb/journal/
directory to support database journaling.If you need to minimize the space allocated to support database journaling then set the
smallfiles
configuration key totrue
in the/etc/mongodb.conf
configuration file. This configuration reduces the size of each journaling file to 512 MB.As the files are created the first time the MongoDB service starts you must stop the service and remove the files for this change to take effect:
# service mongodb stop # rm /var/lib/mongodb/journal/prealloc.* # service mongodb start
For more information on the
smallfiles
configuration key refer to the MongoDB documentation at http://docs.mongodb.org/manual/reference/configuration-options/#smallfiles.For instructions detailing the steps to disable database journaling entirely refer to http://docs.mongodb.org/manual/tutorial/manage-journaling/.
Configure MongoDB to make it listen on the controller management IP address. Edit the
/etc/mongodb.conf
file and modify thebind_ip
key:bind_ip = 10.0.0.11
Restart the MongoDB service to apply the configuration change:
# service mongodb restart
Create the database and a
ceilometer
database user:# mongo --host
controller
--eval ' db = db.getSiblingDB("ceilometer"); db.addUser({user: "ceilometer", pwd: "CEILOMETER_DBPASS
", roles: [ "readWrite", "dbAdmin" ]})'Configure the Telemetry service to use the database:
Edit the
/etc/ceilometer/ceilometer.conf
file and change the[database]
section:[database] # The SQLAlchemy connection string used to connect to the # database (string value) connection = mongodb://ceilometer:
CEILOMETER_DBPASS
@controller
:27017/ceilometerYou must define a secret key that is used as a shared secret among Telemetry service nodes. Use openssl to generate a random token and store it in the configuration file:
# openssl rand -hex 10
Edit the
/etc/ceilometer/ceilometer.conf
file and change the[publisher]
section. ReplaceCEILOMETER_TOKEN
with the results of theopenssl
command:[publisher] # Secret value for signing metering messages (string value) metering_secret =
CEILOMETER_TOKEN
Configure the RabbitMQ access:
Edit the
/etc/ceilometer/ceilometer.conf
file and update the[DEFAULT]
section:rabbit_host =
controller
rabbit_password =RABBIT_PASS
Configure the log directory.
Edit the
/etc/ceilometer/ceilometer.conf
file and update the[DEFAULT]
section:[DEFAULT] log_dir = /var/log/ceilometer
Create a
ceilometer
user that the Telemetry service uses to authenticate with the Identity Service. Use theservice
tenant and give the user theadmin
role:$ keystone user-create --name=ceilometer --pass=
CEILOMETER_PASS
--email=[email protected]
$ keystone user-role-add --user=ceilometer --tenant=service --role=adminAdd the credentials to the configuration files for the Telemetry service:
Edit the
/etc/ceilometer/ceilometer.conf
file and change the[keystone_authtoken]
section:[keystone_authtoken] auth_host = controller auth_port = 35357 auth_protocol = http auth_uri = http://
controller
:5000 admin_tenant_name = service admin_user = ceilometer admin_password =CEILOMETER_PASS
Also set the
[service_credentials]
section:[service_credentials] os_auth_url = http://
controller
:5000/v2.0 os_username = ceilometer os_tenant_name = service os_password =CEILOMETER_PASS
Register the Telemetry service with the Identity Service so that other OpenStack services can locate it. Use the keystone command to register the service and specify the endpoint:
$ keystone service-create --name=ceilometer --type=metering \ --description="Telemetry" $ keystone endpoint-create \ --service-id=$(keystone service-list | awk '/ metering / {print $2}') \ --publicurl=http://
controller
:8777 \ --internalurl=http://controller
:8777 \ --adminurl=http://controller
:8777Restart the services with their new settings:
# service ceilometer-agent-central restart # service ceilometer-agent-notification restart # service ceilometer-api restart # service ceilometer-collector restart # service ceilometer-alarm-evaluator restart # service ceilometer-alarm-notifier restart