OpenStack Victoria : How to use Ceilometer (Glance)2021/09/02 |
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 +--------------------------------------+----------------------------+---------------------------------- | 86981ae7-d713-414f-966c-ac22387a3226 | instance | cba75a02a921457db62b660f3d0b5... | 0697ef58-ac47-5747-bdeb-d4a60a3f068c | instance_disk | cba75a02a921457db62b660f3d0b5... | 6d90e531-c30c-5aa3-bdd2-2b43032ef4cf | instance_network_interface | cba75a02a921457db62b660f3d0b5... +--------------------------------------+----------------------------+---------------------------------- # test to add an image root@dlp ~(keystone)# openstack image create "Debian_11" --file /var/kvm/images/debian11.img --disk-format qcow2 --container-format bare --public # test to download an image root@dlp ~(keystone)# openstack image save --file debian11.qcow2 Debian_11 # list resources root@dlp ~(keystone)# openstack metric resource list +--------------------------------------+----------------------------+---------------------------------- | id | type | project_id +--------------------------------------+----------------------------+---------------------------------- | 86981ae7-d713-414f-966c-ac22387a3226 | instance | cba75a02a921457db62b660f3d0b5... | 0697ef58-ac47-5747-bdeb-d4a60a3f068c | instance_disk | cba75a02a921457db62b660f3d0b5... | 6d90e531-c30c-5aa3-bdd2-2b43032ef4cf | instance_network_interface | cba75a02a921457db62b660f3d0b5... | 6184f061-2042-4db9-9da9-8dbd6f3c06fd | image | 14c0b23f6f574380b9687f326debf... +--------------------------------------+----------------------------+---------------------------------- # details of the [image] resource root@dlp ~(keystone)# openstack metric resource show 6184f061-2042-4db9-9da9-8dbd6f3c06fd +-----------------------+-------------------------------------------------------------------+ | Field | Value | +-----------------------+-------------------------------------------------------------------+ | created_by_project_id | 1718217eee4b4f2ea143d65122864fe0 | | created_by_user_id | 64e62f8bd1714a02998bdd2c3015f940 | | creator | 64e62f8bd1714a02998bdd2c3015f940:1718217eee4b4f2ea143d65122864fe0 | | ended_at | None | | id | 6184f061-2042-4db9-9da9-8dbd6f3c06fd | | metrics | image.download: 10c2d33b-a97b-461a-ba31-364c5e2713d1 | | | image.serve: d820087f-3a8d-40e7-b143-b34346cc028e | | | image.size: ff8c573d-7747-4aa4-92ef-a9f07dbaf15a | | original_resource_id | 6184f061-2042-4db9-9da9-8dbd6f3c06fd | | project_id | 14c0b23f6f574380b9687f326debf0fe | | revision_end | None | | revision_start | 2021-09-02T05:54:56.676716+00:00 | | started_at | 2021-09-02T05:54:56.676710+00:00 | | type | image | | user_id | None | +-----------------------+-------------------------------------------------------------------+ # display image download data root@dlp ~(keystone)# openstack metric measures show 10c2d33b-a97b-461a-ba31-364c5e2713d1 +---------------------------+-------------+--------------+ | timestamp | granularity | value | +---------------------------+-------------+--------------+ | 2021-09-02T00:55:00-05:00 | 300.0 | 5173018624.0 | +---------------------------+-------------+--------------+ # display image size data root@dlp ~(keystone)# openstack metric measures show ff8c573d-7747-4aa4-92ef-a9f07dbaf15a +---------------------------+-------------+--------------+ | timestamp | granularity | value | +---------------------------+-------------+--------------+ | 2021-09-02T00:50:00-05:00 | 300.0 | 5173018624.0 | +---------------------------+-------------+--------------+ |
Sponsored Link |