OpenStack Caracal : How to use Ceilometer (Glance)2024/08/08 |
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 +--------------------------------------+----------------------------+---------------------------------- | 1d0c2140-098d-4a1a-a705-82d7755d7c84 | instance | 03a31c43ede44dcbaacb05c870920... | 1e69e83f-7283-58a2-a1f2-18093aad665d | instance_network_interface | 03a31c43ede44dcbaacb05c870920... | 5770e056-a76c-5bba-9b71-aef9fdefd317 | instance_disk | 03a31c43ede44dcbaacb05c870920... +--------------------------------------+----------------------------+----------------------------------[root@dlp ~(keystone)]# openstack image list +--------------------------------------+----------------+--------+ | ID | Name | Status | +--------------------------------------+----------------+--------+ | cfa9783d-ca91-4e3b-8016-81e3336bd5f0 | 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 +--------------------------------------+----------------------------+---------------------------------- | 1d0c2140-098d-4a1a-a705-82d7755d7c84 | instance | 03a31c43ede44dcbaacb05c870920... | 1e69e83f-7283-58a2-a1f2-18093aad665d | instance_network_interface | 03a31c43ede44dcbaacb05c870920... | 5770e056-a76c-5bba-9b71-aef9fdefd317 | instance_disk | 03a31c43ede44dcbaacb05c870920... | b5fb6c70-9b73-4dfc-9b89-d485e77726c4 | image | b62e60c6d4b7406a90eee2f2d9c45... +--------------------------------------+----------------------------+---------------------------------- # details of the resource [root@dlp ~(keystone)]# openstack metric resource show b5fb6c70-9b73-4dfc-9b89-d485e77726c4 +-----------------------+-------------------------------------------------------------------+ | Field | Value | +-----------------------+-------------------------------------------------------------------+ | created_by_project_id | 0b826f1bf49d489494e94badc32f2cea | | created_by_user_id | c35246b749884d4fae8a3bfaaa0cf7ea | | creator | c35246b749884d4fae8a3bfaaa0cf7ea:0b826f1bf49d489494e94badc32f2cea | | ended_at | None | | id | b5fb6c70-9b73-4dfc-9b89-d485e77726c4 | | metrics | image.size: 9e8bf684-e434-4d80-b794-dc88a71da131 | | original_resource_id | b5fb6c70-9b73-4dfc-9b89-d485e77726c4 | | project_id | b62e60c6d4b7406a90eee2f2d9c45917 | | revision_end | None | | revision_start | 2024-08-07T10:01:43.625080+00:00 | | started_at | 2024-08-07T10:01:43.625074+00:00 | | type | image | | user_id | None | +-----------------------+-------------------------------------------------------------------+ # display image size data [root@dlp ~(keystone)]# openstack metric measures show 9e8bf684-e434-4d80-b794-dc88a71da131 +---------------------------+-------------+--------------+ | timestamp | granularity | value | +---------------------------+-------------+--------------+ | 2024-08-07T19:00:00+09:00 | 300.0 | 3832545280.0 | +---------------------------+-------------+--------------+ |
Sponsored Link |
|