OpenStack Victoria : Ceilometer 利用方法 (Nova Compute)2020/11/20 |
OpenStack Telemetry Service (Ceilometer) の利用方法です。
当例では以下のような環境を例に Ceilometer サービスをインストールしています。
------------+---------------------------+---------------------------+------------ | | | eth0|10.0.0.30 eth0|10.0.0.50 eth0|10.0.0.51 +-----------+-----------+ +-----------+-----------+ +-----------+-----------+ | [ Control Node ] | | [ Storage Node ] | | [ Compute Node ] | | | | | | | | MariaDB RabbitMQ | | Open vSwitch | | Libvirt | | Memcached httpd | | L2 Agent | | Nova Compute | | Keystone Glance | | L3 Agent | | Open vSwitch | | Nova API Cinder API | | Metadata Agent | | L2 Agent | | Neutron Server | | Cinder Volume | | Ceilometer Compute | | Metadata Agent | | Heat API | | | | Gnocchi | | Heat Engine | | | | Ceilometer Central | | | | | +-----------------------+ +-----------------------+ +-----------------------+ |
[1] | Compute サービスの各種データ収集を有効にするには、Compute ノードの Nova Compute を以下のように設定します。 |
[root@node01 ~]#
vi /etc/nova/nova.conf # [DEFAULT] セクション内の任意の場所へ追記
instance_usage_audit = True
instance_usage_audit_period = hour notify_on_state_change = vm_and_task_state # 最終行へ追記 [oslo_messaging_notifications] driver = messagingv2 systemctl restart openstack-nova-compute |
[2] | 任意のユーザーでインスタンスを起動した場合に収集されるデータの表示例です。 |
# インスタンス起動 [cent@dlp ~(keystone)]$ openstack server list +--------------------------------------+----------+---------+-------------------------------------+---------+----------+ | ID | Name | Status | Networks | Image | Flavor | +--------------------------------------+----------+---------+-------------------------------------+---------+----------+ | 852fbb21-1dd6-4268-9532-54876bbc4567 | CentOS-8 | SHUTOFF | private=192.168.100.225, 10.0.0.204 | CentOS8 | m1.small | +--------------------------------------+----------+---------+-------------------------------------+---------+----------+
[cent@dlp ~(keystone)]$
openstack server start CentOS-8
# リソース一覧を表示 # インスタンスで一定の操作をしたのちにデータが取得される [cent@dlp ~(keystone)]$ openstack metric resource list +--------------------------------------+----------------------------+---------------------------------- | id | type | project_id +--------------------------------------+----------------------------+---------------------------------- | 852fbb21-1dd6-4268-9532-54876bbc4567 | instance | 8cc9f93ed89f40e28a610d025462c020 | 66daeeec-3425-5ef9-97e6-4799ce18dea5 | instance_disk | 8cc9f93ed89f40e28a610d025462c020 | a13ba637-1038-5ce5-9f0e-8aac70952d47 | instance_network_interface | 8cc9f93ed89f40e28a610d025462c020 +--------------------------------------+----------------------------+---------------------------------- +----------------------------------+----------------------------------------------------------------------- | user_id | original_resource_id +----------------------------------+----------------------------------------------------------------------- | bb4ae84eefc04357987ec43b8e93118c | 852fbb21-1dd6-4268-9532-54876bbc4567 | bb4ae84eefc04357987ec43b8e93118c | 852fbb21-1dd6-4268-9532-54876bbc4567-vda | bb4ae84eefc04357987ec43b8e93118c | instance-00000002-852fbb21-1dd6-4268-9532-54876bbc4567-tap060563d6-85 +----------------------------------+----------------------------------------------------------------------- +----------------------------------+----------+----------------------------------+-------------- | started_at | ended_at | revision_start | revision_end +----------------------------------+----------+----------------------------------+-------------- | 2020-11-20T07:47:40.958630+00:00 | None | 2020-11-20T07:47:40.958638+00:00 | None | 2020-11-20T07:51:17.427555+00:00 | None | 2020-11-20T07:51:17.427572+00:00 | None | 2020-11-20T07:51:17.435359+00:00 | None | 2020-11-20T07:51:17.435380+00:00 | None +----------------------------------+----------+----------------------------------+-------------- +-------------------------------------------------------------------+ | creator | +-------------------------------------------------------------------+ | fa8f7a76bb114819950cfd6b99238fee:4e42859fe8704e8aaddb5369551b6c52 | | fa8f7a76bb114819950cfd6b99238fee:4e42859fe8704e8aaddb5369551b6c52 | | fa8f7a76bb114819950cfd6b99238fee:4e42859fe8704e8aaddb5369551b6c52 | +-------------------------------------------------------------------+ # [instance] リソース詳細 [cent@dlp ~(keystone)]$ openstack metric resource show 852fbb21-1dd6-4268-9532-54876bbc4567 +-----------------------+-------------------------------------------------------------------+ | Field | Value | +-----------------------+-------------------------------------------------------------------+ | created_by_project_id | 4e42859fe8704e8aaddb5369551b6c52 | | created_by_user_id | fa8f7a76bb114819950cfd6b99238fee | | creator | fa8f7a76bb114819950cfd6b99238fee:4e42859fe8704e8aaddb5369551b6c52 | | ended_at | None | | id | 852fbb21-1dd6-4268-9532-54876bbc4567 | | metrics | cpu: b208f3bb-7f83-4546-8660-985e65b6fa1e | | | disk.ephemeral.size: 41bc54cc-747a-4f0e-864a-84e195891c33 | | | disk.root.size: 12625b16-1fcc-405a-a090-63801a781ab5 | | | memory.usage: 564660ae-4737-4872-9769-bc33c2a23007 | | | memory: bf1f3a7c-f1df-4a96-b447-b8bf60b449b3 | | | vcpus: 02c17dc3-c1b4-4d7f-a7c0-2349145fad5a | | original_resource_id | 852fbb21-1dd6-4268-9532-54876bbc4567 | | project_id | 8cc9f93ed89f40e28a610d025462c020 | | revision_end | None | | revision_start | 2020-11-20T07:47:40.958638+00:00 | | started_at | 2020-11-20T07:47:40.958630+00:00 | | type | instance | | user_id | bb4ae84eefc04357987ec43b8e93118c | +-----------------------+-------------------------------------------------------------------+ # CPU [cent@dlp ~(keystone)]$ openstack metric measures show b208f3bb-7f83-4546-8660-985e65b6fa1e +---------------------------+-------------+----------------+ | timestamp | granularity | value | +---------------------------+-------------+----------------+ | 2020-11-20T16:50:00+09:00 | 300.0 | 99240000000.0 | | 2020-11-20T16:55:00+09:00 | 300.0 | 334980000000.0 | +---------------------------+-------------+----------------+ # メモリー使用 [cent@dlp ~(keystone)]$ openstack metric measures show 564660ae-4737-4872-9769-bc33c2a23007 +---------------------------+-------------+-------------+ | timestamp | granularity | value | +---------------------------+-------------+-------------+ | 2020-11-20T16:50:00+09:00 | 300.0 | 365.9609375 | | 2020-11-20T16:55:00+09:00 | 300.0 | 375.6171875 | +---------------------------+-------------+-------------+ # [instance_network_interface] リソース詳細 [cent@dlp ~(keystone)]$ openstack metric resource show a13ba637-1038-5ce5-9f0e-8aac70952d47 +-----------------------+-----------------------------------------------------------------------+ | Field | Value | +-----------------------+-----------------------------------------------------------------------+ | created_by_project_id | 4e42859fe8704e8aaddb5369551b6c52 | | created_by_user_id | fa8f7a76bb114819950cfd6b99238fee | | creator | fa8f7a76bb114819950cfd6b99238fee:4e42859fe8704e8aaddb5369551b6c52 | | ended_at | None | | id | a13ba637-1038-5ce5-9f0e-8aac70952d47 | | metrics | network.incoming.bytes: f33277a8-651e-49c2-b342-8fa5afebbd48 | | | network.incoming.packets: b54aeb81-3062-46e4-af24-8994759cb6c7 | | | network.outgoing.bytes: 8657c6fc-d572-49a5-b6c4-5b42d6f7a2ce | | | network.outgoing.packets: e5a43057-a2ab-4ddd-b0ff-2dff77521864 | | original_resource_id | instance-00000002-852fbb21-1dd6-4268-9532-54876bbc4567-tap060563d6-85 | | project_id | 8cc9f93ed89f40e28a610d025462c020 | | revision_end | None | | revision_start | 2020-11-20T07:51:17.435380+00:00 | | started_at | 2020-11-20T07:51:17.435359+00:00 | | type | instance_network_interface | | user_id | bb4ae84eefc04357987ec43b8e93118c | +-----------------------+-----------------------------------------------------------------------+ # ネットワーク インカミング バイト [cent@dlp ~(keystone)]$ openstack metric measures show f33277a8-651e-49c2-b342-8fa5afebbd48 +---------------------------+-------------+-------------+ | timestamp | granularity | value | +---------------------------+-------------+-------------+ | 2020-11-20T16:50:00+09:00 | 300.0 | 59410925.0 | | 2020-11-20T16:55:00+09:00 | 300.0 | 112329891.0 | +---------------------------+-------------+-------------+ # ネットワーク アウトゴーイング バイト [cent@dlp ~(keystone)]$ openstack metric measures show 8657c6fc-d572-49a5-b6c4-5b42d6f7a2ce +---------------------------+-------------+----------+ | timestamp | granularity | value | +---------------------------+-------------+----------+ | 2020-11-20T16:50:00+09:00 | 300.0 | 357493.0 | | 2020-11-20T16:55:00+09:00 | 300.0 | 863131.0 | +---------------------------+-------------+----------+ |
Sponsored Link |