Telemetry サービスの動作を検証します。ここの手順では、手順が煩雑にならないように、Image service の計測項目だけを確認しています。他のサービスの ceilometer 連携も行っている環境では、これ以外にも計測項目があります。
注釈
コントローラーノードにおいて、これらの手順を実行します。
admin クレデンシャルを読み込み、管理者専用 CLI コマンドへのアクセス権を取得します。
$ source admin-openrc.sh
利用可能な計測項目を一覧表示します。
$ 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... |
+--------------+-------+-------+--------------------------------------+---------+------------+
Image service から CirrOS イメージをダウンロードします。
$ IMAGE_ID=$(glance image-list | grep 'cirros' | awk '{ print $2 }')
$ glance image-download $IMAGE_ID > /tmp/cirros.img
もう一度、利用可能な計測項目を一覧表示し、イメージのダウンロードを検知できるかどうかを検証します。
$ 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... |
+----------------+-------+-------+--------------------------------------+---------+------------+
image.download メーターの利用状況を取得します。
$ 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 |
+--------+---------------------+---------------------+------------+------------+------------+------------+-------+----------+----------------------------+----------------------------+
上記でダウンロードしたイメージファイル /tmp/cirros.img を削除します。
$ rm /tmp/cirros.img
Except where otherwise noted, this document is licensed under Creative Commons Attribution 3.0 License. See all OpenStack Legal Documents.