OpenStack Zed : How to use Ceilometer (Nova Compute)2022/11/11 |
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 | | 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 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 openstack-nova-compute |
[2] | It's some example to display metrics and meters. |
# start an instance [cent@dlp ~(keystone)]$ openstack server list +--------------------------------------+------------+---------+------------------------------------+----------------+----------+ | ID | Name | Status | Networks | Image | Flavor | +--------------------------------------+------------+---------+------------------------------------+----------------+----------+ | 158685ed-8159-4aad-a294-3227b427f7e1 | CentOS-St9 | SHUTOFF | private=10.0.0.218, 192.168.100.75 | CentOS-Stream9 | m1.small | +--------------------------------------+------------+---------+------------------------------------+----------------+----------+
[cent@dlp ~(keystone)]$
openstack server start CentOS-St9
# list resources # data are stored after some operations are done on instance [cent@dlp ~(keystone)]$ openstack metric resource list +--------------------------------------+----------------------------+---------------------------------- | id | type | project_id +--------------------------------------+----------------------------+---------------------------------- | 158685ed-8159-4aad-a294-3227b427f7e1 | instance | 28b6e37c787240e4a975d3614821cc71 | 18ab0b6e-fe5c-5578-90ec-2a646869eab1 | instance_network_interface | 28b6e37c787240e4a975d3614821cc71 | 256bfff5-a44e-5dc8-961e-553754909551 | instance_disk | 28b6e37c787240e4a975d3614821cc71 +--------------------------------------+----------------------------+---------------------------------- +----------------------------------+----------------------------------------------------------------------- | user_id | original_resource_id +----------------------------------+----------------------------------------------------------------------- | 9e8824a151c949ad9105535ead452501 | 158685ed-8159-4aad-a294-3227b427f7e1 | 9e8824a151c949ad9105535ead452501 | instance-00000001-158685ed-8159-4aad-a294-3227b427f7e1-tape8f2a330-cb | 9e8824a151c949ad9105535ead452501 | 158685ed-8159-4aad-a294-3227b427f7e1-vda +----------------------------------+----------------------------------------------------------------------- +----------------------------------+----------+----------------------------------+-------------- | started_at | ended_at | revision_start | revision_end +----------------------------------+----------+----------------------------------+-------------- | 2022-11-11T07:48:13.150375+00:00 | None | 2022-11-11T07:48:13.150381+00:00 | None | 2022-11-11T07:49:25.178492+00:00 | None | 2022-11-11T07:49:25.178499+00:00 | None | 2022-11-11T07:49:25.205659+00:00 | None | 2022-11-11T07:49:25.205663+00:00 | None +----------------------------------+----------+----------------------------------+-------------- +-------------------------------------------------------------------+ | creator | +-------------------------------------------------------------------+ | 3567bb8bb7594c2189124b7aca36e6d3:62f531f4d2934e75b8d7f11cd7d53be3 | | 3567bb8bb7594c2189124b7aca36e6d3:62f531f4d2934e75b8d7f11cd7d53be3 | | 3567bb8bb7594c2189124b7aca36e6d3:62f531f4d2934e75b8d7f11cd7d53be3 | +-------------------------------------------------------------------+ # details of the [instance] resource [cent@dlp ~(keystone)]$ openstack metric resource show 158685ed-8159-4aad-a294-3227b427f7e1 +-----------------------+-------------------------------------------------------------------+ | Field | Value | +-----------------------+-------------------------------------------------------------------+ | created_by_project_id | 62f531f4d2934e75b8d7f11cd7d53be3 | | created_by_user_id | 3567bb8bb7594c2189124b7aca36e6d3 | | creator | 3567bb8bb7594c2189124b7aca36e6d3:62f531f4d2934e75b8d7f11cd7d53be3 | | ended_at | None | | id | 158685ed-8159-4aad-a294-3227b427f7e1 | | metrics | cpu: 71cca93b-2ae5-426e-ab72-cd9357d9cf09 | | | disk.ephemeral.size: b9afbb77-aaf7-4b9a-9c27-e975488fd958 | | | disk.root.size: 342628ab-02d7-4c2a-baed-efcc36576f23 | | | memory.usage: 76c568cd-9afb-4f9a-942f-e80c5af8cdda | | | memory: 5bd946ce-1351-4453-9016-b7c555af883f | | | vcpus: 591ffa16-1fe4-49e6-92be-9dd3e1a2e335 | | original_resource_id | 158685ed-8159-4aad-a294-3227b427f7e1 | | project_id | 28b6e37c787240e4a975d3614821cc71 | | revision_end | None | | revision_start | 2022-11-11T07:48:13.150381+00:00 | | started_at | 2022-11-11T07:48:13.150375+00:00 | | type | instance | | user_id | 9e8824a151c949ad9105535ead452501 | +-----------------------+-------------------------------------------------------------------+ # CPU [cent@dlp ~(keystone)]$ openstack metric measures show 71cca93b-2ae5-426e-ab72-cd9357d9cf09 +---------------------------+-------------+---------------+ | timestamp | granularity | value | +---------------------------+-------------+---------------+ | 2022-11-11T16:45:00+09:00 | 300.0 | 24260000000.0 | +---------------------------+-------------+---------------+ # memory usage [cent@dlp ~(keystone)]$ openstack metric measures show 76c568cd-9afb-4f9a-942f-e80c5af8cdda +---------------------------+-------------+------------+ | timestamp | granularity | value | +---------------------------+-------------+------------+ | 2022-11-11T16:45:00+09:00 | 300.0 | 362.359375 | +---------------------------+-------------+------------+ # details of [instance_network_interface] [cent@dlp ~(keystone)]$ openstack metric resource show 18ab0b6e-fe5c-5578-90ec-2a646869eab1 +-----------------------+-----------------------------------------------------------------------+ | Field | Value | +-----------------------+-----------------------------------------------------------------------+ | created_by_project_id | 62f531f4d2934e75b8d7f11cd7d53be3 | | created_by_user_id | 3567bb8bb7594c2189124b7aca36e6d3 | | creator | 3567bb8bb7594c2189124b7aca36e6d3:62f531f4d2934e75b8d7f11cd7d53be3 | | ended_at | None | | id | 18ab0b6e-fe5c-5578-90ec-2a646869eab1 | | metrics | network.incoming.bytes: 4fb41c9b-b084-412f-a72f-5b0d25a7caa4 | | | network.incoming.packets: 9bd5db0e-6228-4099-befc-54619bf973fd | | | network.outgoing.bytes: 886d9b6d-884e-4c2a-bd61-108a3a2ae151 | | | network.outgoing.packets: 5ecaeb37-ab5a-401e-8ea5-fbbb02964b13 | | original_resource_id | instance-00000001-158685ed-8159-4aad-a294-3227b427f7e1-tape8f2a330-cb | | project_id | 28b6e37c787240e4a975d3614821cc71 | | revision_end | None | | revision_start | 2022-11-11T07:49:25.178499+00:00 | | started_at | 2022-11-11T07:49:25.178492+00:00 | | type | instance_network_interface | | user_id | 9e8824a151c949ad9105535ead452501 | +-----------------------+-----------------------------------------------------------------------+ # display network incoming bytes [cent@dlp ~(keystone)]$ openstack metric measures show 4fb41c9b-b084-412f-a72f-5b0d25a7caa4 +---------------------------+-------------+-----------+ | timestamp | granularity | value | +---------------------------+-------------+-----------+ | 2022-11-11T16:45:00+09:00 | 300.0 | 3590187.0 | +---------------------------+-------------+-----------+ # display network outgoing bytes [cent@dlp ~(keystone)]$ openstack metric measures show 886d9b6d-884e-4c2a-bd61-108a3a2ae151 +---------------------------+-------------+-------------+ | timestamp | granularity | value | +---------------------------+-------------+-------------+ | 2022-11-11T16:45:00+09:00 | 300.0 | 387100313.0 | +---------------------------+-------------+-------------+ |
Sponsored Link |