OpenStack Zed : How to use Ceilometer (Nova Compute)2023/06/30 |
This is how to use OpenStack Telemetry Service (Ceilometer) for Nova Compute 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 | | Neutron L2/L3 Agent | | Libvirt | | Memcached Nginx | | Neutron Metadata | | Nova Compute | | Keystone httpd | | Open vSwitch | | Neutron L2 Agent | | Glance Nova API | | iSCSI Target | | Open vSwitch | | Neutron Server | | Cinder Volume | | Ceilometer Compute | | Neutron Metadata | | httpd Gnocchi | | | | Cinder API | | Ceilometer Central | | | +-----------------------+ +-----------------------+ +-----------------------+ |
[1] | Change settings for Nova Compute service to enable Telemetry data collection like follows. |
root@node01:~#
vi /etc/nova/nova.conf # add follows into [DEFAULT] section instance_usage_audit = True instance_usage_audit_period = hour # add to the end [notifications] notify_on_state_change = vm_and_task_state [oslo_messaging_notifications] driver = messagingv2 systemctl restart nova-compute |
[2] | It's some example to display metrics and meters. |
# start an instance debian@dlp ~(keystone)$ openstack server list +--------------------------------------+-----------+---------+------------------------------------+----------+-----------+ | ID | Name | Status | Networks | Image | Flavor | +--------------------------------------+-----------+---------+------------------------------------+----------+-----------+ | c3a4a792-a7ac-41bd-8c93-7fd162016f22 | Debian-12 | SHUTOFF | private=10.0.0.241, 192.168.100.66 | Debian12 | m1.medium | +--------------------------------------+-----------+---------+------------------------------------+----------+-----------+debian@dlp ~(keystone)$ openstack server start Debian-12 # display resources # after doing some operations on instance, metrics data are gotten debian@dlp ~(keystone)$ openstack metric resource list +--------------------------------------+----------------------------+---------------------------------- | id | type | project_id +--------------------------------------+----------------------------+---------------------------------- | c3a4a792-a7ac-41bd-8c93-7fd162016f22 | instance | 1c2f5dc8c4f9494fbaaa4217c8e3585a | 88e37527-710f-53a8-9bb3-4cf76791b60b | instance_disk | 1c2f5dc8c4f9494fbaaa4217c8e3585a | 18c74205-a37f-5ea3-b7db-c342b76a24c2 | instance_network_interface | 1c2f5dc8c4f9494fbaaa4217c8e3585a +--------------------------------------+----------------------------+---------------------------------- +----------------------------------+----------------------------------------------------------------------- | user_id | original_resource_id +----------------------------------+----------------------------------------------------------------------- | de51d5f0ee2c485885877d21f5b424e0 | c3a4a792-a7ac-41bd-8c93-7fd162016f22 | de51d5f0ee2c485885877d21f5b424e0 | c3a4a792-a7ac-41bd-8c93-7fd162016f22-vda | de51d5f0ee2c485885877d21f5b424e0 | instance-00000002-c3a4a792-a7ac-41bd-8c93-7fd162016f22-tapb1189c54-2f +----------------------------------+----------------------------------------------------------------------- +----------------------------------+----------+----------------------------------+-------------- | started_at | ended_at | revision_start | revision_end +----------------------------------+----------+----------------------------------+-------------- | 2023-06-30T02:27:46.589318+00:00 | None | 2023-06-30T02:27:46.589325+00:00 | None | 2023-06-30T02:29:55.518815+00:00 | None | 2023-06-30T02:29:55.518823+00:00 | None | 2023-06-30T02:29:55.639728+00:00 | None | 2023-06-30T02:29:55.639736+00:00 | None +----------------------------------+----------+----------------------------------+-------------- +-------------------------------------------------------------------+ | creator | +-------------------------------------------------------------------+ | 89f390200afd4423bd9322787a94efa8:d8b09d86ed7743039f92b2e542ea26c1 | | 89f390200afd4423bd9322787a94efa8:d8b09d86ed7743039f92b2e542ea26c1 | | 89f390200afd4423bd9322787a94efa8:d8b09d86ed7743039f92b2e542ea26c1 | +-------------------------------------------------------------------+ # details of the [instance] resource debian@dlp ~(keystone)$ openstack metric resource show c3a4a792-a7ac-41bd-8c93-7fd162016f22 +-----------------------+-------------------------------------------------------------------+ | Field | Value | +-----------------------+-------------------------------------------------------------------+ | created_by_project_id | d8b09d86ed7743039f92b2e542ea26c1 | | created_by_user_id | 89f390200afd4423bd9322787a94efa8 | | creator | 89f390200afd4423bd9322787a94efa8:d8b09d86ed7743039f92b2e542ea26c1 | | ended_at | None | | id | c3a4a792-a7ac-41bd-8c93-7fd162016f22 | | metrics | cpu: 40acf516-9019-4324-8343-f9bd575eccbd | | | disk.ephemeral.size: 5556c196-739e-4e41-b582-36f679e1397e | | | disk.root.size: 236c0af5-0efe-41c7-90f5-ff39eb5a0687 | | | memory.usage: e9e487c3-8d40-400a-b38b-7a5a9b12a993 | | | memory: 0637ecac-c73b-4168-a04c-8259112d0cbc | | | vcpus: 378e2179-48fb-4c5c-a45a-aca1d5c14a43 | | original_resource_id | c3a4a792-a7ac-41bd-8c93-7fd162016f22 | | project_id | 1c2f5dc8c4f9494fbaaa4217c8e3585a | | revision_end | None | | revision_start | 2023-06-30T02:27:46.589325+00:00 | | started_at | 2023-06-30T02:27:46.589318+00:00 | | type | instance | | user_id | de51d5f0ee2c485885877d21f5b424e0 | +-----------------------+-------------------------------------------------------------------+ # CPU debian@dlp ~(keystone)$ openstack metric measures show 40acf516-9019-4324-8343-f9bd575eccbd +---------------------------+-------------+---------------+ | timestamp | granularity | value | +---------------------------+-------------+---------------+ | 2023-06-29T21:25:00-05:00 | 300.0 | 79640000000.0 | +---------------------------+-------------+---------------+ # memory usage debian@dlp ~(keystone)$ openstack metric measures show e9e487c3-8d40-400a-b38b-7a5a9b12a993 +---------------------------+-------------+-------------+ | timestamp | granularity | value | +---------------------------+-------------+-------------+ | 2023-06-29T21:25:00-05:00 | 300.0 | 330.6953125 | +---------------------------+-------------+-------------+ # details of [instance_network_interface] debian@dlp ~(keystone)$ openstack metric resource show 18c74205-a37f-5ea3-b7db-c342b76a24c2 +-----------------------+-----------------------------------------------------------------------+ | Field | Value | +-----------------------+-----------------------------------------------------------------------+ | created_by_project_id | d8b09d86ed7743039f92b2e542ea26c1 | | created_by_user_id | 89f390200afd4423bd9322787a94efa8 | | creator | 89f390200afd4423bd9322787a94efa8:d8b09d86ed7743039f92b2e542ea26c1 | | ended_at | None | | id | 18c74205-a37f-5ea3-b7db-c342b76a24c2 | | metrics | network.incoming.bytes: 452b10be-4360-4cb5-9f4f-3102ec88ab6c | | | network.incoming.packets: f33c54ec-909b-4984-b103-4ab67b9ecdd4 | | | network.outgoing.bytes: 7adcc665-831c-4950-9abe-321ab94c4dfd | | | network.outgoing.packets: 17c27ac2-4b66-4c94-8363-4e7a8761e029 | | original_resource_id | instance-00000002-c3a4a792-a7ac-41bd-8c93-7fd162016f22-tapb1189c54-2f | | project_id | 1c2f5dc8c4f9494fbaaa4217c8e3585a | | revision_end | None | | revision_start | 2023-06-30T02:29:55.639736+00:00 | | started_at | 2023-06-30T02:29:55.639728+00:00 | | type | instance_network_interface | | user_id | de51d5f0ee2c485885877d21f5b424e0 | +-----------------------+-----------------------------------------------------------------------+ # display network incoming bytes debian@dlp ~(keystone)$ openstack metric measures show 452b10be-4360-4cb5-9f4f-3102ec88ab6c +---------------------------+-------------+-----------+ | timestamp | granularity | value | +---------------------------+-------------+-----------+ | 2023-06-29T21:25:00-05:00 | 300.0 | 4942104.0 | +---------------------------+-------------+-----------+ # display network outgoing bytes debian@dlp ~(keystone)$ openstack metric measures show 7adcc665-831c-4950-9abe-321ab94c4dfd +---------------------------+-------------+---------+ | timestamp | granularity | value | +---------------------------+-------------+---------+ | 2023-06-29T21:25:00-05:00 | 300.0 | 84504.0 | +---------------------------+-------------+---------+ |
Sponsored Link |
|