OpenStack Victoria : How to use Ceilometer (Glance)2020/10/22 |
This is how to use OpenStack Telemetry Service (Ceilometer) for Glance service.
This example is based on the environment like follows.
------------+---------------------------+---------------------------+------------ | | | eth0|10.0.0.30 eth0|10.0.0.50 eth0|10.0.0.51 +-----------+-----------+ +-----------+-----------+ +-----------+-----------+ | [ Control Node ] | | [ Network Node ] | | [ Compute Node ] | | | | | | | | MariaDB RabbitMQ | | Linux Bridge | | Libvirt | | Memcached httpd | | L2 Agent | | Nova Compute | | Keystone Glance | | L3 Agent | | Linux Bridge | | Nova_API Cinder_API | | Metadata Agent | | L2 Agent | | Neutron Server | | Cinder Volume | | Ceilometer Compute | | Metadata Agent | | Heat API | | | | | | Heat Engine | | | | | | Gnocchi httpd | | | | | | Ceilometer Central | | | +-----------------------+ +-----------------------+ +-----------------------+ |
[1] | Change settings for Glance service to enable Telemetry data collention like follows. |
root@dlp ~(keystone)#
vi /etc/glance/glance-api.conf # add to the end [oslo_messaging_notifications] driver = messagingv2 # RabbitMQ connection info transport_url = rabbit://openstack:password@10.0.0.30 systemctl restart glance-api |
[2] | It's some example to display metrics and meters. |
# display resources root@dlp ~(keystone)# openstack metric resource list +--------------------------------------+----------------------------+---------------------------------- | id | type | project_id +--------------------------------------+----------------------------+---------------------------------- | 10abf4e3-d5d9-4b57-a5a0-7cb767442dcc | instance | 6c44eafd4f614985bf74b94f2aee8... | c96d50ae-df9a-58f4-acb8-d3fbfad117dd | instance_disk | 6c44eafd4f614985bf74b94f2aee8... | 103be51a-14ae-5fc4-8f0b-9b7458fc1bc1 | instance_network_interface | 6c44eafd4f614985bf74b94f2aee8... +--------------------------------------+----------------------------+---------------------------------- # test to add an image root@dlp ~(keystone)# openstack image create "Ubuntu200402" --file /var/kvm/images/ubuntu2004.img --disk-format qcow2 --container-format bare --public # test to download an image root@dlp ~(keystone)# openstack image save --file ubuntu2004.qcow2 Ubuntu200402 # list resources root@dlp ~(keystone)# openstack metric resource list +--------------------------------------+----------------------------+---------------------------------- | id | type | project_id +--------------------------------------+----------------------------+---------------------------------- | 10abf4e3-d5d9-4b57-a5a0-7cb767442dcc | instance | 6c44eafd4f614985bf74b94f2aee8... | c96d50ae-df9a-58f4-acb8-d3fbfad117dd | instance_disk | 6c44eafd4f614985bf74b94f2aee8... | 103be51a-14ae-5fc4-8f0b-9b7458fc1bc1 | instance_network_interface | 6c44eafd4f614985bf74b94f2aee8... | 83f33ef1-c089-4324-b0f5-17ce87855a38 | image | b573c9e160864f028fc2d681a929f... +--------------------------------------+----------------------------+---------------------------------- # details of the [image] resource root@dlp ~(keystone)# openstack metric resource show 83f33ef1-c089-4324-b0f5-17ce87855a38 +-----------------------+-------------------------------------------------------------------+ | Field | Value | +-----------------------+-------------------------------------------------------------------+ | created_by_project_id | 37197271a1954ddb90207a95d5f46488 | | created_by_user_id | a954b69f9b8345d9a797abbc0a949108 | | creator | a954b69f9b8345d9a797abbc0a949108:37197271a1954ddb90207a95d5f46488 | | ended_at | None | | id | 83f33ef1-c089-4324-b0f5-17ce87855a38 | | metrics | image.download: 635ec339-dfc6-45ba-aa33-7676915f5a23 | | | image.serve: 41ff51d7-a0b6-40c5-89aa-65182dc1a516 | | | image.size: 38df0c71-24c3-4b8c-ad29-c0075af950e5 | | original_resource_id | 83f33ef1-c089-4324-b0f5-17ce87855a38 | | project_id | b573c9e160864f028fc2d681a929f5af | | revision_end | None | | revision_start | 2020-10-22T01:33:47.381709+00:00 | | started_at | 2020-10-22T01:33:47.381703+00:00 | | type | image | | user_id | None | +-----------------------+-------------------------------------------------------------------+ # display image download data root@dlp ~(keystone)# openstack metric measures show 635ec339-dfc6-45ba-aa33-7676915f5a23 +---------------------------+-------------+--------------+ | timestamp | granularity | value | +---------------------------+-------------+--------------+ | 2020-10-22T10:30:00+09:00 | 300.0 | 2834497536.0 | +---------------------------+-------------+--------------+ # display image size data root@dlp ~(keystone)# openstack metric measures show 38df0c71-24c3-4b8c-ad29-c0075af950e5 +---------------------------+-------------+--------------+ | timestamp | granularity | value | +---------------------------+-------------+--------------+ | 2020-10-22T10:30:00+09:00 | 300.0 | 2834497536.0 | +---------------------------+-------------+--------------+ |
Sponsored Link |
|