From f6268ba315ae708b3c30ea6b1189ec9b31159f54 Mon Sep 17 00:00:00 2001 From: Dhriti Shikhar Date: Thu, 15 Jan 2015 18:48:11 +0530 Subject: [PATCH] Improved ceilometer content Closes-bug: #1405252 Co-Authored-By: Matt Kassawara backport: juno Change-Id: Iccbea43eea85ad78910f86c81d7f32383c5d4440 --- .../section_ceilometer-controller.xml | 41 +++++++++++++------ .../section_ceilometer-glance.xml | 35 +++++++++------- doc/install-guide/section_ceilometer-nova.xml | 41 +++++++++++-------- .../section_ceilometer-verify.xml | 39 +++++++++++------- 4 files changed, 98 insertions(+), 58 deletions(-) diff --git a/doc/install-guide/section_ceilometer-controller.xml b/doc/install-guide/section_ceilometer-controller.xml index bce906ddf6..a1701d914c 100644 --- a/doc/install-guide/section_ceilometer-controller.xml +++ b/doc/install-guide/section_ceilometer-controller.xml @@ -40,7 +40,7 @@ Key Expires: Sat Dec 20 20:08:39 2014 Install the MongoDB package: # yum install mongodb-server mongodb # zypper install mongodb - # apt-get install mongodb-server + # apt-get install mongodb-server mongodb-clients python-pymongo Edit the /etc/mongodb.conf file and @@ -83,8 +83,8 @@ Key Expires: Sat Dec 20 20:08:39 2014 # systemctl start mongodb.service - # service mongod start -# chkconfig mongod on + # systemctl enable mongod.service +# systemctl start mongod.service @@ -94,7 +94,19 @@ Key Expires: Sat Dec 20 20:08:39 2014 db = db.getSiblingDB("ceilometer"); db.addUser({user: "ceilometer", pwd: "CEILOMETER_DBPASS", - roles: [ "readWrite", "dbAdmin" ]})' + roles: [ "readWrite", "dbAdmin" ]})' + +MongoDB shell version: X.Y.Z +connecting to: controller:27017/test +{ + "user" : "ceilometer", + "pwd" : "72f25aeee7ad4be52437d7cd3fc60f6f", + "roles" : [ + "readWrite", + "dbAdmin" + ], + "_id" : ObjectId("5489c22270d7fad1ba631dc3") +} Replace CEILOMETER_DBPASS with a suitable password. @@ -126,7 +138,7 @@ Key Expires: Sat Dec 20 20:08:39 2014 - Create the Telemetry service API endpoints: + Create the Telemetry module API endpoints: $ keystone endpoint-create \ --service-id $(keystone service-list | awk '/ metering / {print $2}') \ --publicurl http://controller:8777 \ @@ -206,7 +218,9 @@ Key Expires: Sat Dec 20 20:08:39 2014 ... connection = mongodb://ceilometer:CEILOMETER_DBPASS@controller:27017/ceilometer Replace CEILOMETER_DBPASS with - the password you chose for the Telemetry module database. + the password you chose for the Telemetry module database. MongoDB + connection string requires escaping special characters as per + RFC2396. In the [DEFAULT] section, configure @@ -267,13 +281,6 @@ metering_secret = METERING_SECRET Replace METERING_SECRET with the metering secret that you generated in a previous step. - - In the [DEFAULT] section, configure the log - directory: - [DEFAULT] -... -log_dir = /var/log/ceilometer - In the [collector] section, configure the dispatcher: @@ -282,6 +289,14 @@ log_dir = /var/log/ceilometer ... dispatcher = database + + (Optional) To assist with troubleshooting, + enable verbose logging in the [DEFAULT] + section: + [DEFAULT] +... +verbose = True + diff --git a/doc/install-guide/section_ceilometer-glance.xml b/doc/install-guide/section_ceilometer-glance.xml index 38eaed8699..ba93794021 100644 --- a/doc/install-guide/section_ceilometer-glance.xml +++ b/doc/install-guide/section_ceilometer-glance.xml @@ -6,28 +6,35 @@ xml:id="ceilometer-agent-glance"> Configure the Image Service for Telemetry + To configure prerequisites + To retrieve image samples, you must configure the Image + Service to send notifications to the message broker. Edit the + /etc/glance/glance-api.conf and + /etc/glance/glance-registry.conf files and + complete the following actions: - To retrieve image samples, you must configure the Image - Service to send notifications to the bus. - Edit - /etc/glance/glance-api.conf and modify the - [DEFAULT] section: - notification_driver = messaging + In the [DEFAULT] section, configure + notifications and RabbitMQ message broker access: + [DEFAULT] +... +notification_driver = messaging rpc_backend = rabbit rabbit_host = controller rabbit_password = RABBIT_PASS + Replace RABBIT_PASS with the + password you chose for the guest account in + RabbitMQ. - Restart the Image Services with their new - settings: - # service glance-registry restart + Restart the Image Service: + # service glance-registry restart # service glance-api restart - # systemctl restart openstack-glance-api.service openstack-glance-registry.service - On SLES: - # service openstack-glance-api restart + # systemctl restart openstack-glance-api.service openstack-glance-registry.service + On SLES: + # service openstack-glance-api restart # service openstack-glance-registry restart - On openSUSE: - # systemctl restart openstack-glance-api.service openstack-glance-registry.service + On openSUSE: + # systemctl restart openstack-glance-api.service openstack-glance-registry.service diff --git a/doc/install-guide/section_ceilometer-nova.xml b/doc/install-guide/section_ceilometer-nova.xml index 51a1676c13..cd164e5758 100644 --- a/doc/install-guide/section_ceilometer-nova.xml +++ b/doc/install-guide/section_ceilometer-nova.xml @@ -19,7 +19,7 @@ Edit the /etc/nova/nova.conf file and - add the following lines to the [DEFAULT] + configure notifications in the [DEFAULT] section: [DEFAULT] ... @@ -44,18 +44,19 @@ notification_driver = ceilometer.compute.nova_notifier Edit the /etc/ceilometer/ceilometer.conf file and complete the following actions: - In the [publisher] section, set the - metering secret for Telemetry service nodes: + In the [publisher] section, configure the + metering secret: [publisher] -# Secret value for signing metering messages (string value) +... metering_secret = METERING_SECRET Replace METERING_SECRET with - the metering secret that you created previously. + the metering secret you chose for the Telemetry module. In the [DEFAULT] section, configure - RabbitMQ broker access: + RabbitMQ message broker access: [DEFAULT] +... rabbit_host = controller rabbit_password = RABBIT_PASS Replace RABBIT_PASS with the password @@ -65,6 +66,7 @@ rabbit_password = RABBIT_PASS In the [keystone_authtoken] section, configure Identity service access: [keystone_authtoken] +... auth_uri = http://controller:5000/v2.0 identity_uri = http://controller:35357 admin_tenant_name = service @@ -83,29 +85,34 @@ admin_password = CEILOMETER_PASS In the [service_credentials] section, configure service credentials: [service_credentials] +... os_auth_url = http://controller:5000/v2.0 os_username = ceilometer os_tenant_name = service os_password = CEILOMETER_PASS -os_endpoint_type = internalURL - Replace CEILOMETER_PASS with the password you chose for the - ceilometer user in the Identity service. +os_endpoint_type = internalURL +os_region_name = regionOne + Replace CEILOMETER_PASS with the password + you chose for the ceilometer user in the Identity + service. - - In the [DEFAULT] section, configure the - log directory: - [DEFAULT] -log_dir = /var/log/ceilometer + + (Optional) To assist with troubleshooting, + enable verbose logging in the [DEFAULT] + section: + [DEFAULT] +... +verbose = True - To finish installation + To finalize installation - Restart the service with its new settings: + Restart the Telemetry service: # service ceilometer-agent-compute restart - Start the service and configure it to start when the + Start the Telemetry service and configure it to start when the system boots: # systemctl enable openstack-ceilometer-compute.service # systemctl start openstack-ceilometer-compute.service diff --git a/doc/install-guide/section_ceilometer-verify.xml b/doc/install-guide/section_ceilometer-verify.xml index aaa5b31ee9..b896a003f4 100644 --- a/doc/install-guide/section_ceilometer-verify.xml +++ b/doc/install-guide/section_ceilometer-verify.xml @@ -5,30 +5,40 @@ version="5.0" xml:id="ceilometer-verify"> Verify the Telemetry installation - To test the Telemetry installation, download an image from the - Image Service, and use the ceilometer command to display usage statistics. - + This section describes how to verify operation of the Telemetry + module. + + Perform these commands on the controller node. + - Use the ceilometer meter-list command to test - the access to Telemetry: - $ ceilometer meter-list - +------------+-------+-------+--------------------------------------+---------+----------------------------------+ + Source the admin credentials to gain access to + admin-only CLI commands: + $ source admin-openrc.sh + + + List available meters: + $ ceilometer meter-list ++------------+-------+-------+--------------------------------------+---------+----------------------------------+ | Name | Type | Unit | Resource ID | User ID | Project ID | +------------+-------+-------+--------------------------------------+---------+----------------------------------+ | image | gauge | image | acafc7c0-40aa-4026-9673-b879898e1fc2 | None | efa984b0a914450e9a47788ad330699d | | image.size | gauge | B | acafc7c0-40aa-4026-9673-b879898e1fc2 | None | efa984b0a914450e9a47788ad330699d | +------------+-------+-------+--------------------------------------+---------+----------------------------------+ + + Some meters might not appear until after you successfully launch + at least one instance. + Download an image from the Image Service: $ glance image-download "cirros-0.3.3-x86_64" > cirros.img - Call the ceilometer meter-list command again to - validate that the download has been detected and stored by the Telemetry: - $ ceilometer meter-list - +----------------+-------+-------+--------------------------------------+---------+----------------------------------+ + List available meters again to validate detection of the image + download: + $ ceilometer meter-list ++----------------+-------+-------+--------------------------------------+---------+----------------------------------+ | Name | Type | Unit | Resource ID | User ID | Project ID | +----------------+-------+-------+--------------------------------------+---------+----------------------------------+ | image | gauge | image | acafc7c0-40aa-4026-9673-b879898e1fc2 | None | efa984b0a914450e9a47788ad330699d | @@ -38,9 +48,10 @@ +----------------+-------+-------+--------------------------------------+---------+----------------------------------+ - You can now get usage statistics for the various meters: - $ ceilometer statistics -m image.download -p 60 - +--------+---------------------+---------------------+-------+------------+------------+------------+------------+----------+----------------------------+----------------------------+ + Retrieve usage statistics from the image.download + meter: + $ ceilometer statistics -m image.download -p 60 ++--------+---------------------+---------------------+-------+------------+------------+------------+------------+----------+----------------------------+----------------------------+ | Period | Period Start | Period End | Count | Min | Max | Sum | Avg | Duration | Duration Start | Duration End | +--------+---------------------+---------------------+-------+------------+------------+------------+------------+----------+----------------------------+----------------------------+ | 60 | 2013-11-18T18:08:50 | 2013-11-18T18:09:50 | 1 | 13167616.0 | 13167616.0 | 13167616.0 | 13167616.0 | 0.0 | 2013-11-18T18:09:05.334000 | 2013-11-18T18:09:05.334000 |