OpenStack Dalmatian : How to use Ceilometer (Glance)2024/10/16 |
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 +-----------+-----------+ +-----------+-----------+ +-----------+-----------+ | [ dlp.srv.world ] | | [ network.srv.world ] | | [ node01.srv.world ] | | (Control Node) | | (Network Node) | | (Compute Node) | | | | | | | | MariaDB RabbitMQ | | Open vSwitch | | Libvirt | | Memcached Nginx | | Neutron Server | | Nova Compute | | Keystone httpd | | OVN-Northd | | Open vSwitch | | Glance Nova API | | Nginx iSCSI Target | | OVN Metadata Agent | | Cinder API | | Cinder Volume | | OVN-Controller | | | | Gnocchi httpd | | Ceilometer Compute | | | | Ceilometer Central | | | +-----------------------+ +-----------------------+ +-----------------------+ |
[1] | Change settings for Glance service to enable Telemetry data collection like follows. |
[root@dlp ~(keystone)]#
vi /etc/glance/glance-api.conf # add to last line [oslo_messaging_notifications] driver = messagingv2 # RabbitMQ connection info transport_url = rabbit://openstack:password@dlp.srv.world systemctl restart openstack-glance-api |
[2] | It's some example to display metrics and meters. |
# list resources [root@dlp ~(keystone)]# openstack metric resource list +--------------------------------------+----------------------------+---------------------------------- | id | type | project_id +--------------------------------------+----------------------------+---------------------------------- | 3d753408-6705-4cbf-acd8-2e09d975b973 | instance | 756e2b4937c44d3991028e294f92d... | d9634b44-bf91-5f24-b3e9-a3f82258e684 | instance_disk | 756e2b4937c44d3991028e294f92d... | 7a63d41b-5fef-566a-bc9d-e4881287698c | instance_network_interface | 756e2b4937c44d3991028e294f92d... +--------------------------------------+----------------------------+----------------------------------[root@dlp ~(keystone)]# openstack image list +--------------------------------------+----------------+--------+ | ID | Name | Status | +--------------------------------------+----------------+--------+ | 75e0d976-4075-4488-8f26-87d4a50aebe9 | CentOS-Stream9 | active | +--------------------------------------+----------------+--------+ # test to download an image [root@dlp ~(keystone)]# openstack image save --file centos-st9.qcow2 CentOS-Stream9 # test to add an image [root@dlp ~(keystone)]# openstack image create "CentOS-ST9" --file centos-st9.qcow2 --disk-format qcow2 --container-format bare --public # list resources [root@dlp ~(keystone)]# openstack metric resource list +--------------------------------------+----------------------------+---------------------------------- | id | type | project_id +--------------------------------------+----------------------------+---------------------------------- | 3d753408-6705-4cbf-acd8-2e09d975b973 | instance | 756e2b4937c44d3991028e294f92d... | d9634b44-bf91-5f24-b3e9-a3f82258e684 | instance_disk | 756e2b4937c44d3991028e294f92d... | 7a63d41b-5fef-566a-bc9d-e4881287698c | instance_network_interface | 756e2b4937c44d3991028e294f92d... | bb369ad7-fc00-4fa1-8817-5d1493d49f41 | image | b19d04cd37254937a4eaebcd0f0f0... +--------------------------------------+----------------------------+---------------------------------- # details of the resource [root@dlp ~(keystone)]# openstack metric resource show bb369ad7-fc00-4fa1-8817-5d1493d49f41 +-----------------------+-------------------------------------------------------------------+ | Field | Value | +-----------------------+-------------------------------------------------------------------+ | created_by_project_id | aff8e7e402dc4d9e849bbe0e34fa4538 | | created_by_user_id | 49ad0cbb8d944b8fbe748507c42d0702 | | creator | 49ad0cbb8d944b8fbe748507c42d0702:aff8e7e402dc4d9e849bbe0e34fa4538 | | ended_at | None | | id | bb369ad7-fc00-4fa1-8817-5d1493d49f41 | | metrics | image.size: ec6a0f0e-f183-4dde-b776-bf5110f80738 | | original_resource_id | bb369ad7-fc00-4fa1-8817-5d1493d49f41 | | project_id | b19d04cd37254937a4eaebcd0f0f0a43 | | revision_end | None | | revision_start | 2024-10-16T01:11:16.446649+00:00 | | started_at | 2024-10-16T01:11:16.446645+00:00 | | type | image | | user_id | None | +-----------------------+-------------------------------------------------------------------+ # display image size data [root@dlp ~(keystone)]# openstack metric measures show ec6a0f0e-f183-4dde-b776-bf5110f80738 +---------------------------+-------------+--------------+ | timestamp | granularity | value | +---------------------------+-------------+--------------+ | 2024-10-16T10:10:00+09:00 | 300.0 | 2560950272.0 | +---------------------------+-------------+--------------+ |
Sponsored Link |