OpenStack Zed : How to use Ceilometer (Cinder)2022/11/11 |
This is how to use OpenStack Telemetry Service (Ceilometer) for Cinder 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 Cinder service to enable Telemetry data collection like follows. Change on all Nodes Cinder services are running. |
[root@dlp ~(keystone)]#
vi /etc/cinder/cinder.conf # add to the end [oslo_messaging_notifications] driver = messagingv2 transport_url = rabbit://openstack:password@dlp.srv.world systemctl restart openstack-cinder-api openstack-cinder-scheduler |
[2] | It's some example to display metrics and meters. |
# list resources [cent@dlp ~(keystone)]$ openstack metric resource list +--------------------------------------+----------------------------+---------------------------------- | id | type | project_id +--------------------------------------+----------------------------+---------------------------------- | 158685ed-8159-4aad-a294-3227b427f7e1 | instance | 28b6e37c787240e4a975d3614821c... | 18ab0b6e-fe5c-5578-90ec-2a646869eab1 | instance_network_interface | 28b6e37c787240e4a975d3614821c... | 256bfff5-a44e-5dc8-961e-553754909551 | instance_disk | 28b6e37c787240e4a975d3614821c... +--------------------------------------+----------------------------+---------------------------------- # test to create a volume [cent@dlp ~(keystone)]$ openstack volume create --size 10 disk01 # list resources [cent@dlp ~(keystone)]$ openstack metric resource list +--------------------------------------+----------------------------+---------------------------------- | id | type | project_id +--------------------------------------+----------------------------+---------------------------------- | 158685ed-8159-4aad-a294-3227b427f7e1 | instance | 28b6e37c787240e4a975d3614821c... | 18ab0b6e-fe5c-5578-90ec-2a646869eab1 | instance_network_interface | 28b6e37c787240e4a975d3614821c... | 256bfff5-a44e-5dc8-961e-553754909551 | instance_disk | 28b6e37c787240e4a975d3614821c... | 23f54c08-08b1-4bd8-b581-8f5cc62bbdf8 | volume | 28b6e37c787240e4a975d3614821c... +--------------------------------------+----------------------------+---------------------------------- # details of the resource [cent@dlp ~(keystone)]$ openstack metric resource show 23f54c08-08b1-4bd8-b581-8f5cc62bbdf8 +-----------------------+-------------------------------------------------------------------+ | Field | Value | +-----------------------+-------------------------------------------------------------------+ | created_by_project_id | 62f531f4d2934e75b8d7f11cd7d53be3 | | created_by_user_id | 3567bb8bb7594c2189124b7aca36e6d3 | | creator | 3567bb8bb7594c2189124b7aca36e6d3:62f531f4d2934e75b8d7f11cd7d53be3 | | ended_at | None | | id | 23f54c08-08b1-4bd8-b581-8f5cc62bbdf8 | | metrics | volume.size: e9e32c9d-d6ca-4f5d-9a87-b5594cbcd214 | | original_resource_id | 23f54c08-08b1-4bd8-b581-8f5cc62bbdf8 | | project_id | 28b6e37c787240e4a975d3614821cc71 | | revision_end | None | | revision_start | 2022-11-11T08:09:53.314428+00:00 | | started_at | 2022-11-11T08:09:53.314422+00:00 | | type | volume | | user_id | 9e8824a151c949ad9105535ead452501 | +-----------------------+-------------------------------------------------------------------+ # display volume size data [cent@dlp ~(keystone)]$ openstack metric measures show e9e32c9d-d6ca-4f5d-9a87-b5594cbcd214 +---------------------------+-------------+-------+ | timestamp | granularity | value | +---------------------------+-------------+-------+ | 2022-11-11T17:05:00+09:00 | 300.0 | 10.0 | +---------------------------+-------------+-------+ |
Sponsored Link |
|