Ubuntu 22.04
Sponsored Link

OpenStack Antelope : Ceilometer का उपयोग कैसे करें (Nova)2023/09/11

 
Nova कंप्यूट सेवा के लिए OpenStack टेलीमेट्री सेवा (Ceilometer) का उपयोग इस प्रकार करें।
यह उदाहरण निम्न प्रकार से पर्यावरण पर आधारित है।
------------+--------------------------+--------------------------+------------
            |                          |                          |
        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] टेलीमेट्री डेटा संग्रह को सक्षम करने के लिए Nova कंप्यूट सेवा के लिए सेटिंग्स निम्नानुसार बदलें।
root@node01:~#
vi /etc/nova/nova.conf
# [DEFAULT] अनुभाग में अनुसरण जोड़ें
instance_usage_audit = True
instance_usage_audit_period = hour

# अंत में जोड़ें
[notifications]
notify_on_state_change = vm_and_task_state

[oslo_messaging_notifications]
driver = messagingv2

root@node01:~#
systemctl restart nova-compute

[2] यह मेट्रिक्स और मीटर प्रदर्शित करने के लिए कुछ उदाहरण है।
# एक उदाहरण प्रारंभ करें

ubuntu@dlp ~(keystone)$
openstack server list

+--------------------------------------+-------------+---------+-------------------------------------+------------+-----------+
| ID                                   | Name        | Status  | Networks                            | Image      | Flavor    |
+--------------------------------------+-------------+---------+-------------------------------------+------------+-----------+
| 11987eec-fb38-4de1-a386-3d1d6001bbd3 | Ubuntu-2204 | SHUTOFF | private=10.0.0.252, 192.168.100.100 | Ubuntu2204 | m1.medium |
+--------------------------------------+-------------+---------+-------------------------------------+------------+-----------+

ubuntu@dlp ~(keystone)$
openstack server start Ubuntu-2204

# संसाधन प्रदर्शित करें
# उदाहरण के तौर पर कुछ ऑपरेशन करने के बाद मेट्रिक्स डेटा प्राप्त होता है

ubuntu@dlp ~(keystone)$
openstack metric resource list

+--------------------------------------+----------------------------+----------------------------------
| id                                   | type                       | project_id                       
+--------------------------------------+----------------------------+----------------------------------
| 11987eec-fb38-4de1-a386-3d1d6001bbd3 | instance                   | e294bd7c00314facacdb46c36fb54ee9 
| 29b605b9-5568-5534-b3c4-470045cbcbe0 | instance_network_interface | e294bd7c00314facacdb46c36fb54ee9 
| 55b09db0-31af-58e5-ab82-da9b1d35c949 | instance_disk              | e294bd7c00314facacdb46c36fb54ee9 
+--------------------------------------+----------------------------+----------------------------------
+----------------------------------+-----------------------------------------------------------------------
| user_id                          | original_resource_id                                                  
+----------------------------------+-----------------------------------------------------------------------
| 85236576a97e492791abe70c217c8898 | 11987eec-fb38-4de1-a386-3d1d6001bbd3                                  
| 85236576a97e492791abe70c217c8898 | instance-00000001-11987eec-fb38-4de1-a386-3d1d6001bbd3-tap6b961da5-d0 
| 85236576a97e492791abe70c217c8898 | 11987eec-fb38-4de1-a386-3d1d6001bbd3-vda                              
+----------------------------------+-----------------------------------------------------------------------
+----------------------------------+----------+----------------------------------+--------------
| started_at                       | ended_at | revision_start                   | revision_end 
+----------------------------------+----------+----------------------------------+--------------
| 2023-03-29T02:05:56.850715+00:00 | None     | 2023-03-29T02:05:56.850722+00:00 | None         
| 2023-03-29T02:10:11.914313+00:00 | None     | 2023-03-29T02:10:11.914318+00:00 | None         
| 2023-03-29T02:10:11.998661+00:00 | None     | 2023-03-29T02:10:11.998666+00:00 | None         
+----------------------------------+----------+----------------------------------+--------------
+-------------------------------------------------------------------+
| creator                                                           |
+-------------------------------------------------------------------+
| f88cfb33fa07437ca440ee5ef5642c95:d3dd87fb1a034f7883539a6a4f83781f |
| f88cfb33fa07437ca440ee5ef5642c95:d3dd87fb1a034f7883539a6a4f83781f |
| f88cfb33fa07437ca440ee5ef5642c95:d3dd87fb1a034f7883539a6a4f83781f |
+-------------------------------------------------------------------+

# [instance] संसाधन का विवरण

ubuntu@dlp ~(keystone)$
openstack metric resource show 11987eec-fb38-4de1-a386-3d1d6001bbd3

+-----------------------+-------------------------------------------------------------------+
| Field                 | Value                                                             |
+-----------------------+-------------------------------------------------------------------+
| created_by_project_id | d3dd87fb1a034f7883539a6a4f83781f                                  |
| created_by_user_id    | f88cfb33fa07437ca440ee5ef5642c95                                  |
| creator               | f88cfb33fa07437ca440ee5ef5642c95:d3dd87fb1a034f7883539a6a4f83781f |
| ended_at              | None                                                              |
| id                    | 11987eec-fb38-4de1-a386-3d1d6001bbd3                              |
| metrics               | cpu: 803974fc-fbd0-4775-8f02-4543f38f2ab4                         |
|                       | disk.ephemeral.size: 2b734907-8695-4b9a-aa99-f0c47d1d825d         |
|                       | disk.root.size: 2b058968-0615-47e3-8dcd-1f8baaf9e5af              |
|                       | memory.usage: ef18d67f-993f-4204-925d-cc49d4d2621c                |
|                       | memory: 99c08173-8966-4e79-bcba-3db7ed690977                      |
|                       | vcpus: 500db462-982f-4947-8df8-8f205fb4a26b                       |
| original_resource_id  | 11987eec-fb38-4de1-a386-3d1d6001bbd3                              |
| project_id            | e294bd7c00314facacdb46c36fb54ee9                                  |
| revision_end          | None                                                              |
| revision_start        | 2023-03-29T02:05:56.850722+00:00                                  |
| started_at            | 2023-03-29T02:05:56.850715+00:00                                  |
| type                  | instance                                                          |
| user_id               | 85236576a97e492791abe70c217c8898                                  |
+-----------------------+-------------------------------------------------------------------+

# CPU

ubuntu@dlp ~(keystone)$
openstack metric measures show 803974fc-fbd0-4775-8f02-4543f38f2ab4

+---------------------------+-------------+----------------+
| timestamp                 | granularity |          value |
+---------------------------+-------------+----------------+
| 2023-03-29T11:10:00+09:00 |       300.0 | 121690000000.0 |
+---------------------------+-------------+----------------+

# स्मृति प्रयोग

ubuntu@dlp ~(keystone)$
openstack metric measures show ef18d67f-993f-4204-925d-cc49d4d2621c

+---------------------------+-------------+--------------+
| timestamp                 | granularity |        value |
+---------------------------+-------------+--------------+
| 2023-03-29T11:10:00+09:00 |       300.0 | 453.44921875 |
+---------------------------+-------------+--------------+

# [instance_network_interface] का विवरण

ubuntu@dlp ~(keystone)$
openstack metric resource show 29b605b9-5568-5534-b3c4-470045cbcbe0

+-----------------------+-----------------------------------------------------------------------+
| Field                 | Value                                                                 |
+-----------------------+-----------------------------------------------------------------------+
| created_by_project_id | d3dd87fb1a034f7883539a6a4f83781f                                      |
| created_by_user_id    | f88cfb33fa07437ca440ee5ef5642c95                                      |
| creator               | f88cfb33fa07437ca440ee5ef5642c95:d3dd87fb1a034f7883539a6a4f83781f     |
| ended_at              | None                                                                  |
| id                    | 29b605b9-5568-5534-b3c4-470045cbcbe0                                  |
| metrics               | network.incoming.bytes: bd75940e-66ed-4ab5-9382-a523b15d83b2          |
|                       | network.incoming.packets: fe203610-ba5c-457f-af66-a2aac99c10ef        |
|                       | network.outgoing.bytes: f204ab01-10bd-4305-a40e-c6dc692436be          |
|                       | network.outgoing.packets: b8f1b2a3-b9c5-4fa0-bb85-2a3984884594        |
| original_resource_id  | instance-00000001-11987eec-fb38-4de1-a386-3d1d6001bbd3-tap6b961da5-d0 |
| project_id            | e294bd7c00314facacdb46c36fb54ee9                                      |
| revision_end          | None                                                                  |
| revision_start        | 2023-03-29T02:10:11.914318+00:00                                      |
| started_at            | 2023-03-29T02:10:11.914313+00:00                                      |
| type                  | instance_network_interface                                            |
| user_id               | 85236576a97e492791abe70c217c8898                                      |
+-----------------------+-----------------------------------------------------------------------+

# नेटवर्क इनकमिंग बाइट्स प्रदर्शित करें

ubuntu@dlp ~(keystone)$
openstack metric measures show bd75940e-66ed-4ab5-9382-a523b15d83b2

+---------------------------+-------------+----------+
| timestamp                 | granularity |    value |
+---------------------------+-------------+----------+
| 2023-03-29T11:10:00+09:00 |       300.0 | 812237.0 |
+---------------------------+-------------+----------+

# नेटवर्क आउटगोइंग बाइट्स प्रदर्शित करें

ubuntu@dlp ~(keystone)$
openstack metric measures show f204ab01-10bd-4305-a40e-c6dc692436be

+---------------------------+-------------+------------+
| timestamp                 | granularity |      value |
+---------------------------+-------------+------------+
| 2023-03-29T11:10:00+09:00 |       300.0 | 55614415.0 |
+---------------------------+-------------+------------+
मिलान सामग्री