update verify to use gnocchi

don't use ceilometer api to verify install. give instructions for gnocchi
and alternatively suggest using file

Change-Id: I331bf2853b3f67b0b6a6578f3fbaae3e005d6322
This commit is contained in:
gord chung 2017-01-27 20:22:22 +00:00
parent 8342ff8968
commit f02d9f85c2
1 changed files with 41 additions and 28 deletions

View File

@ -11,6 +11,12 @@ integration for additional services contain more meters.
Perform these steps on the controller node.
.. note::
The following uses Gnocchi to verify data. Alternatively, data can be
published to a file backend temporarily by adding meter_dispatchers=file
or a `file://` publisher.
#. Source the ``admin`` credentials to gain access to
admin-only CLI commands:
@ -18,17 +24,38 @@ integration for additional services contain more meters.
$ . admin-openrc
#. List available meters:
#. List available resource and its metrics:
.. code-block:: console
$ ceilometer meter-list
+--------------+-------+-------+--------------------------------------+---------+------------+
| Name | Type | Unit | Resource ID | User ID | Project ID |
+--------------+-------+-------+--------------------------------------+---------+------------+
| image | gauge | image | acafc7c0-40aa-4026-9673-b879898e1fc2 | None | cf12a15... |
| image.size | gauge | B | acafc7c0-40aa-4026-9673-b879898e1fc2 | None | cf12a15... |
+--------------+-------+-------+--------------------------------------+---------+------------+
$ gnocchi resource list --type image
+--------------------------------------+-------+----------------------------------+---------+--------------------------------------+----------------------------------+----------+----------------------------------+--------------+
| id | type | project_id | user_id | original_resource_id | started_at | ended_at | revision_start | revision_end |
+--------------------------------------+-------+----------------------------------+---------+--------------------------------------+----------------------------------+----------+----------------------------------+--------------+
| a6b387e1-4276-43db-b17a-e10f649d85a3 | image | 6fd9631226e34531b53814a0f39830a9 | None | a6b387e1-4276-43db-b17a-e10f649d85a3 | 2017-01-25T23:50:14.423584+00:00 | None | 2017-01-25T23:50:14.423601+00:00 | None |
+--------------------------------------+-------+----------------------------------+---------+--------------------------------------+----------------------------------+----------+----------------------------------+--------------+
$ gnocchi resource a6b387e1-4276-43db-b17a-e10f649d85a3
+-----------------------+-------------------------------------------------------------------+
| Field | Value |
+-----------------------+-------------------------------------------------------------------+
| created_by_project_id | aca4db3db9904ecc9c1c9bb1763da6a8 |
| created_by_user_id | 07b0945689a4407dbd1ea72c3c5b8d2f |
| creator | 07b0945689a4407dbd1ea72c3c5b8d2f:aca4db3db9904ecc9c1c9bb1763da6a8 |
| ended_at | None |
| id | a6b387e1-4276-43db-b17a-e10f649d85a3 |
| metrics | image.download: 839afa02-1668-4922-a33e-6b6ea7780715 |
| | image.serve: 1132e4a0-9e35-4542-a6ad-d6dc5fb4b835 |
| | image.size: 8ecf6c17-98fd-446c-8018-b741dc089a76 |
| original_resource_id | a6b387e1-4276-43db-b17a-e10f649d85a3 |
| project_id | 6fd9631226e34531b53814a0f39830a9 |
| revision_end | None |
| revision_start | 2017-01-25T23:50:14.423601+00:00 |
| started_at | 2017-01-25T23:50:14.423584+00:00 |
| type | image |
| user_id | None |
+-----------------------+-------------------------------------------------------------------+
#. Download the CirrOS image from the Image service:
@ -42,26 +69,12 @@ integration for additional services contain more meters.
.. code-block:: console
$ ceilometer meter-list
+----------------+-------+-------+--------------------------------------+---------+------------+
| Name | Type | Unit | Resource ID | User ID | Project ID |
+----------------+-------+-------+--------------------------------------+---------+------------+
| image | gauge | image | acafc7c0-40aa-4026-9673-b879898e1fc2 | None | cf12a15... |
| image.download | delta | B | acafc7c0-40aa-4026-9673-b879898e1fc2 | None | cf12a15... |
| image.serve | delta | B | acafc7c0-40aa-4026-9673-b879898e1fc2 | None | cf12a15... |
| image.size | gauge | B | acafc7c0-40aa-4026-9673-b879898e1fc2 | None | cf12a15... |
+----------------+-------+-------+--------------------------------------+---------+------------+
#. Retrieve usage statistics from the ``image.download`` meter:
.. code-block:: console
$ ceilometer statistics -m image.download -p 60
+--------+---------------------+---------------------+------------+------------+------------+------------+-------+----------+----------------------------+----------------------------+
| Period | Period Start | Period End | Max | Min | Avg | Sum | Count | Duration | Duration Start | Duration End |
+--------+---------------------+---------------------+------------+------------+------------+------------+-------+----------+----------------------------+----------------------------+
| 60 | 2015-04-21T12:21:45 | 2015-04-21T12:22:45 | 13200896.0 | 13200896.0 | 13200896.0 | 13200896.0 | 1 | 0.0 | 2015-04-21T12:22:12.983000 | 2015-04-21T12:22:12.983000 |
+--------+---------------------+---------------------+------------+------------+------------+------------+-------+----------+----------------------------+----------------------------+
$ gnocchi measures show 839afa02-1668-4922-a33e-6b6ea7780715
+---------------------------+-------------+-----------+
| timestamp | granularity | value |
+---------------------------+-------------+-----------+
| 2017-01-26T15:35:00+00:00 | 300.0 | 3740163.0 |
+---------------------------+-------------+-----------+
#. Remove the previously downloaded image file ``/tmp/cirros.img``: