OpenStack Rocky : How to use Ceilometer (Glance)2018/09/06 |
This is how to use OpenStack Telemetry Service (Ceilometer) for Glance service.
This example is based on the emvironment like follows.
------------+---------------------------+---------------------------+------------ | | | 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] | 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
[root@dlp ~(keystone)]#
vi /etc/glance/glance-registry.conf # add to the end [oslo_messaging_notifications] driver = messagingv2 # RabbitMQ connection info transport_url = rabbit://openstack:password@10.0.0.30 systemctl restart openstack-glance-api openstack-glance-registry |
[2] | It's some example to display metrics and meters. |
# list resources [root@dlp ~(keystone)]# openstack metric resource list +--------------------------------------+----------------------------+---------------------------------- | id | type | project_id +--------------------------------------+----------------------------+---------------------------------- | 45d4a9ba-d6ec-4263-a81c-487702f98e33 | instance | 3c9dc9d8d71149a7b835e1f5813d2... | bbdaa383-5531-57a5-b411-e991064fa095 | instance_network_interface | 3c9dc9d8d71149a7b835e1f5813d2... | f909ac06-3daa-566e-93d4-10141ad2ce8a | instance_disk | 3c9dc9d8d71149a7b835e1f5813d2... | 5b30f928-8834-4ab5-a5ce-760c48d4c9b7 | instance | 3c9dc9d8d71149a7b835e1f5813d2... +--------------------------------------+----------------------------+---------------------------------- # test to add an image [root@dlp ~(keystone)]# openstack image create "CentOS75" --file centos75.qcow2 --disk-format qcow2 --container-format bare --public # test to download an image [root@dlp ~(keystone)]# openstack image save --file centos7.qcow2 CentOS75 # list resources [root@dlp ~(keystone)]# openstack metric resource list +--------------------------------------+----------------------------+---------------------------------- | id | type | project_id +--------------------------------------+----------------------------+---------------------------------- | 45d4a9ba-d6ec-4263-a81c-487702f98e33 | instance | 3c9dc9d8d71149a7b835e1f5813d2... | bbdaa383-5531-57a5-b411-e991064fa095 | instance_network_interface | 3c9dc9d8d71149a7b835e1f5813d2... | f909ac06-3daa-566e-93d4-10141ad2ce8a | instance_disk | 3c9dc9d8d71149a7b835e1f5813d2... | 5b30f928-8834-4ab5-a5ce-760c48d4c9b7 | instance | 3c9dc9d8d71149a7b835e1f5813d2... | e89a7a4a-8cad-4ecd-8535-183ef77b1500 | image | 2cb4b9d73bcc46449f711794506c3... +--------------------------------------+----------------------------+---------------------------------- # details of the resource [root@dlp ~(keystone)]# openstack metric resource show e89a7a4a-8cad-4ecd-8535-183ef77b1500 +-----------------------+-------------------------------------------------------------------+ | Field | Value | +-----------------------+-------------------------------------------------------------------+ | created_by_project_id | ece4ac6c7e764a979e36ba0b2faf848e | | created_by_user_id | cfc889992c144012a0092b270bfa0fbd | | creator | cfc889992c144012a0092b270bfa0fbd:ece4ac6c7e764a979e36ba0b2faf848e | | ended_at | None | | id | e89a7a4a-8cad-4ecd-8535-183ef77b1500 | | metrics | image.download: 117d25f0-319b-4ec0-982f-7b6490a7272b | | | image.serve: 9be14791-f7ad-4628-a2ca-1c080617bdd8 | | | image.size: 7da39de2-5693-4a99-8a50-ad3dfa105b98 | | original_resource_id | e89a7a4a-8cad-4ecd-8535-183ef77b1500 | | project_id | 2cb4b9d73bcc46449f711794506c3faf | | revision_end | None | | revision_start | 2018-09-06T05:54:22.435737+00:00 | | started_at | 2018-09-06T05:54:22.435693+00:00 | | type | image | | user_id | None | +-----------------------+-------------------------------------------------------------------+ # display image download [root@dlp ~(keystone)]# openstack metric measures show 117d25f0-319b-4ec0-982f-7b6490a7272b +---------------------------+-------------+--------------+ | timestamp | granularity | value | +---------------------------+-------------+--------------+ | 2018-09-06T14:50:00+09:00 | 300.0 | 1421869056.0 | +---------------------------+-------------+--------------+ # display image size [root@dlp ~(keystone)]# openstack metric measures show 7da39de2-5693-4a99-8a50-ad3dfa105b98 +---------------------------+-------------+--------------+ | timestamp | granularity | value | +---------------------------+-------------+--------------+ | 2018-09-06T14:50:00+09:00 | 300.0 | 1421869056.0 | +---------------------------+-------------+--------------+ |
Sponsored Link |
|