OpenStack Stein : How to use Ceilometer (Cinder)2019/04/18 |
This is how to use OpenStack Telemetry Service (Ceilometer) for Cinder service.
This example is based on the emvironment 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 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 apache2 cinder-scheduler |
[2] | It's some example to display metrics and meters. |
# list resources ubuntu@dlp ~(keystone)$ openstack metric resource list +--------------------------------------+----------------------------+---------------------------------- | id | type | project_id +--------------------------------------+----------------------------+---------------------------------- | c714d070-f035-42b8-9660-999088da37b1 | instance | ff03eefa265b423aa3375acb46a8e... | 933faac4-688a-55a5-8f62-927898cc9297 | instance_network_interface | ff03eefa265b423aa3375acb46a8e... | 26de0c76-9999-5e9b-b3e3-758a1af1b5e3 | instance_disk | ff03eefa265b423aa3375acb46a8e... | f92025e7-33b7-4a63-bc25-8b7d206773d9 | instance | ff03eefa265b423aa3375acb46a8e... +--------------------------------------+----------------------------+---------------------------------- # test to create a volume ubuntu@dlp ~(keystone)$ openstack volume create --size 10 disk01 # list resources ubuntu@dlp ~(keystone)$ openstack metric resource list +--------------------------------------+----------------------------+--------------------------------- | id | type | project_id +--------------------------------------+----------------------------+--------------------------------- | c714d070-f035-42b8-9660-999088da37b1 | instance | ff03eefa265b423aa3375acb46a8e... | 933faac4-688a-55a5-8f62-927898cc9297 | instance_network_interface | ff03eefa265b423aa3375acb46a8e... | 26de0c76-9999-5e9b-b3e3-758a1af1b5e3 | instance_disk | ff03eefa265b423aa3375acb46a8e... | f92025e7-33b7-4a63-bc25-8b7d206773d9 | instance | ff03eefa265b423aa3375acb46a8e... | 97f57314-259e-4b99-b202-575a8e7a0ed8 | volume | ff03eefa265b423aa3375acb46a8e... +--------------------------------------+----------------------------+--------------------------------- # details of volume resource ubuntu@dlp ~(keystone)$ openstack metric resource show 97f57314-259e-4b99-b202-575a8e7a0ed8 +-----------------------+-------------------------------------------------------------------+ | Field | Value | +-----------------------+-------------------------------------------------------------------+ | created_by_project_id | efc5c6a05d444cae80c0a80f49ba87d4 | | created_by_user_id | ad726bcc13b9436d8fecb2336e9a5dae | | creator | ad726bcc13b9436d8fecb2336e9a5dae:efc5c6a05d444cae80c0a80f49ba87d4 | | ended_at | None | | id | 97f57314-259e-4b99-b202-575a8e7a0ed8 | | metrics | volume.size: 84be5c3b-1ccd-4b8c-9a1c-a710566f111e | | original_resource_id | 97f57314-259e-4b99-b202-575a8e7a0ed8 | | project_id | ff03eefa265b423aa3375acb46a8e4e0 | | revision_end | None | | revision_start | 2019-04-18T03:58:37.584059+00:00 | | started_at | 2019-04-18T03:58:37.584005+00:00 | | type | volume | | user_id | 5ed13a6b898b412383faf11ab2099a66 | +-----------------------+-------------------------------------------------------------------+ # display volume size data ubuntu@dlp ~(keystone)$ openstack metric measures show 84be5c3b-1ccd-4b8c-9a1c-a710566f111e +---------------------------+-------------+-------+ | timestamp | granularity | value | +---------------------------+-------------+-------+ | 2019-04-18T12:55:00+09:00 | 300.0 | 10.0 | +---------------------------+-------------+-------+ |
Sponsored Link |