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 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
Configure MongoDB to make it listen on the controller public IP address. Edit the
/etc/mongodb.conf
file and modify thebind_ip
key:bind_ip = 192.168.0.10
Restart the MongoDB service to apply the configuration change:
# service mongodb restart
Create the database and a
ceilometer
database user:# mongo --host
controller
> use 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 an 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_rpc]
section. ReplaceADMIN_TOKEN
with the results of theopenssl
command:[publisher_rpc] # Secret value for signing metering messages (string value) metering_secret =
ADMIN_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_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="Ceilometer Telemetry Service"
Note the
id
property that is returned for the service. Use it when you create the endpoint:# keystone endpoint-create \ --service-id=
the_service_id_above
\ --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-api restart # service ceilometer-collector restart