OpenStack Yoga : How to use Ceilometer (Cinder)2022/06/02 |
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 httpd | | Neutron Server | | Nova Compute | | Keystone Glance | | OVN-Northd | | Open vSwitch | | Nova API Cinder API | | Cinder Volume | | OVN Metadata Agent | | | | Gnocchi httpd | | OVN-Controller | | | | Ceilometer Central | | Ceilometer Compute | +-----------------------+ +-----------------------+ +-----------------------+ |
[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@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 +--------------------------------------+----------------------------+---------------------------------- | fa3a20c0-f0f4-46eb-b63f-69abba312d03 | instance | 3d85d1e79d654b3dade01eb5bfbf0... | bbd4fd1d-5a1f-5a70-aac7-81b72a8ece38 | instance_network_interface | 3d85d1e79d654b3dade01eb5bfbf0... | f0f7ad4d-fcc3-56e2-81fa-fb086d93d6d3 | instance_disk | 3d85d1e79d654b3dade01eb5bfbf0... +--------------------------------------+----------------------------+---------------------------------- # 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 +--------------------------------------+----------------------------+---------------------------------- | fa3a20c0-f0f4-46eb-b63f-69abba312d03 | instance | 3d85d1e79d654b3dade01eb5bfbf0... | bbd4fd1d-5a1f-5a70-aac7-81b72a8ece38 | instance_network_interface | 3d85d1e79d654b3dade01eb5bfbf0... | f0f7ad4d-fcc3-56e2-81fa-fb086d93d6d3 | instance_disk | 3d85d1e79d654b3dade01eb5bfbf0... | 1e46dbc8-78c3-45ca-8744-11fe39c34bc5 | volume | 3d85d1e79d654b3dade01eb5bfbf0... +--------------------------------------+----------------------------+---------------------------------- # details of the resource [cent@dlp ~(keystone)]$ openstack metric resource show 1e46dbc8-78c3-45ca-8744-11fe39c34bc5 +-----------------------+-------------------------------------------------------------------+ | Field | Value | +-----------------------+-------------------------------------------------------------------+ | created_by_project_id | 8787527217494c6a87dd5a3b68dce1ef | | created_by_user_id | 0101cdc1b5f64f998ec4d7541fed4771 | | creator | 0101cdc1b5f64f998ec4d7541fed4771:8787527217494c6a87dd5a3b68dce1ef | | ended_at | None | | id | 1e46dbc8-78c3-45ca-8744-11fe39c34bc5 | | metrics | volume.size: df3b0250-885f-4d89-b840-2400b7b3cec8 | | original_resource_id | 1e46dbc8-78c3-45ca-8744-11fe39c34bc5 | | project_id | 3d85d1e79d654b3dade01eb5bfbf0679 | | revision_end | None | | revision_start | 2022-06-02T04:12:58.805080+00:00 | | started_at | 2022-06-02T04:12:58.805064+00:00 | | type | volume | | user_id | ed0bc393ae81411fa1db0828e1d5e160 | +-----------------------+-------------------------------------------------------------------+ # display volume size data [cent@dlp ~(keystone)]$ openstack metric measures show df3b0250-885f-4d89-b840-2400b7b3cec8 +---------------------------+-------------+-------+ | timestamp | granularity | value | +---------------------------+-------------+-------+ | 2022-06-02T13:10:00+09:00 | 300.0 | 10.0 | +---------------------------+-------------+-------+ |
Sponsored Link |