OpenStack Xena : How to use Ceilometer (Cinder)2021/11/25 |
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 +-----------+-----------+ +-----------+-----------+ +-----------+-----------+ | [ Control Node ] | | [ Network Node ] | | [ Compute Node ] | | | | | | | | MariaDB RabbitMQ | | Open vSwitch | | Libvirt | | Memcached httpd | | Neutron Server | | Nova Compute | | Keystone Glance | | OVN-Northd | | Open vSwitch | | Nova API | | Cinder Volume | | OVN Metadata Agent | | Cinder API | | iSCSI Target | | OVN-Controller | | | | Heat API/Engine | | Ceilometer Compute | | | | Gnocchi httpd | | | | | | Ceilometer Central | | | +-----------------------+ +-----------------------+ +-----------------------+ |
[1] | Change settings for Cinder service to enable Telemetry data collention 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@10.0.0.30 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 +--------------------------------------+----------------------------+---------------------------------- | a6180855-77cf-476f-9f26-4fc79baa38c2 | instance | 2decda8bcd724687a1cf05064ab21... | 5624383f-677b-598e-a43b-4eb1a1cb5afd | instance_disk | 2decda8bcd724687a1cf05064ab21... | d83f7af1-8e5c-52a0-b151-0a0ee0978e9a | instance_network_interface | 2decda8bcd724687a1cf05064ab21... +--------------------------------------+----------------------------+---------------------------------- # 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 +--------------------------------------+----------------------------+---------------------------------- | a6180855-77cf-476f-9f26-4fc79baa38c2 | instance | 2decda8bcd724687a1cf05064ab21... | 5624383f-677b-598e-a43b-4eb1a1cb5afd | instance_disk | 2decda8bcd724687a1cf05064ab21... | d83f7af1-8e5c-52a0-b151-0a0ee0978e9a | instance_network_interface | 2decda8bcd724687a1cf05064ab21... | afaf4dac-cff5-4d7c-a5fd-178438b12028 | volume | 2decda8bcd724687a1cf05064ab21... +--------------------------------------+----------------------------+---------------------------------- # details of the resource [cent@dlp ~(keystone)]$ openstack metric resource show afaf4dac-cff5-4d7c-a5fd-178438b12028 +-----------------------+-------------------------------------------------------------------+ | Field | Value | +-----------------------+-------------------------------------------------------------------+ | created_by_project_id | 7e53ef14eb894f379ea1929f5defc949 | | created_by_user_id | 1bbca96b926645e18c83df974aafc98f | | creator | 1bbca96b926645e18c83df974aafc98f:7e53ef14eb894f379ea1929f5defc949 | | ended_at | None | | id | afaf4dac-cff5-4d7c-a5fd-178438b12028 | | metrics | volume.size: bd3237cf-5090-47d2-b655-ebcaf424ee73 | | original_resource_id | afaf4dac-cff5-4d7c-a5fd-178438b12028 | | project_id | 2decda8bcd724687a1cf05064ab21fdf | | revision_end | None | | revision_start | 2021-11-25T06:27:23.536050+00:00 | | started_at | 2021-11-25T06:27:23.536043+00:00 | | type | volume | | user_id | 6a517543654044e8b4ea9e0eea0adaa4 | +-----------------------+-------------------------------------------------------------------+ # display volume size data [cent@dlp ~(keystone)]$ openstack metric measures show bd3237cf-5090-47d2-b655-ebcaf424ee73 +---------------------------+-------------+-------+ | timestamp | granularity | value | +---------------------------+-------------+-------+ | 2021-11-25T15:25:00+09:00 | 300.0 | 10.0 | +---------------------------+-------------+-------+ |
Sponsored Link |