Install the Telemetry module

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.

  1. Install the Telemetry Service on the controller node:

    # apt-get install ceilometer-api ceilometer-collector ceilometer-agent-central python-ceilometerclient
  2. 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
  3. Configure MongoDB to make it listen on the controller public IP address. Edit the /etc/mongodb.conf file and modify the bind_ip key:

    bind_ip = 192.168.0.10
  4. Restart the MongoDB service to apply the configuration change:

    # service mongodb restart
  5. Create the database and a ceilometer database user:

    # mongo --host controller
    > use ceilometer
    > db.addUser( { user: "ceilometer",
                  pwd: "CEILOMETER_DBPASS",
                  roles: [ "readWrite", "dbAdmin" ]
                } )
  6. 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/ceilometer
  7. You 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. Replace ADMIN_TOKEN with the results of the openssl command:

    [publisher_rpc]
    # Secret value for signing metering messages (string value)
    metering_secret = ADMIN_TOKEN
    ...
  8. Configure the RabbitMQ access:

    Edit the /etc/ceilometer/ceilometer.conf file and update the [DEFAULT] section:

    rabbit_host = controller
    rabbit_password = RABBIT_PASS
  9. Configure the log directory.

    Edit the /etc/ceilometer/ceilometer.conf file and update the [DEFAULT] section:

    [DEFAULT]
    log_dir = /var/log/ceilometer
  10. Create a ceilometer user that the Telemetry Service uses to authenticate with the Identity Service. Use the service tenant and give the user the admin role:

    # keystone user-create --name=ceilometer --pass=CEILOMETER_PASS --email=[email protected]
    # keystone user-role-add --user=ceilometer --tenant=service --role=admin
  11. Add 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
  12. 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"
  13. 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:8777
  14. Restart the services with their new settings:

    # service ceilometer-agent-central restart
    # service ceilometer-api restart
    # service ceilometer-collector restart
Log a bug against this page


loading table of contents...