Ubuntu 22.04
Sponsored Link

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

 
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    |
+--------------------------------------+-------------+---------+------------------------------------+------------+-----------+
| 530698ed-413e-4bda-b02e-8f6f60380bd1 | Ubuntu-2204 | SHUTOFF | private=10.0.0.222, 192.168.100.79 | Ubuntu2204 | m1.medium |
+--------------------------------------+-------------+---------+------------------------------------+------------+-----------+

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

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

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

+--------------------------------------+----------------------------+----------------------------------
| id                                   | type                       | project_id                       
+--------------------------------------+----------------------------+----------------------------------
| 530698ed-413e-4bda-b02e-8f6f60380bd1 | instance                   | f30cd546632e484cb24414d83207694b 
| 08fd4272-e83e-5e79-8a9a-05905598f8a5 | instance_network_interface | f30cd546632e484cb24414d83207694b 
| 6b32c72e-9cef-54f0-9a38-dc657e110413 | instance_disk              | f30cd546632e484cb24414d83207694b 
+--------------------------------------+----------------------------+----------------------------------
+----------------------------------+-----------------------------------------------------------------------
| user_id                          | original_resource_id                                                  
+----------------------------------+-----------------------------------------------------------------------
| 470c9323dad64bbea8fb5ecca6381f72 | 530698ed-413e-4bda-b02e-8f6f60380bd1                                  
| 470c9323dad64bbea8fb5ecca6381f72 | instance-00000001-530698ed-413e-4bda-b02e-8f6f60380bd1-tapbfc2108d-94 
| 470c9323dad64bbea8fb5ecca6381f72 | 530698ed-413e-4bda-b02e-8f6f60380bd1-vda                              
+----------------------------------+-----------------------------------------------------------------------
+----------------------------------+----------+----------------------------------
| started_at                       | ended_at | revision_start                   
+----------------------------------+----------+----------------------------------
| 2023-10-10T00:07:31.776539+00:00 | None     | 2023-10-10T00:07:31.776545+00:00 
| 2023-10-10T00:11:48.469911+00:00 | None     | 2023-10-10T00:11:48.469917+00:00 
| 2023-10-10T00:11:48.776676+00:00 | None     | 2023-10-10T00:11:48.776682+00:00 
+----------------------------------+----------+----------------------------------
+--------------+-------------------------------------------------------------------+
| revision_end | creator                                                           |
+--------------+-------------------------------------------------------------------+
| None         | 1a0486c8d8664739b082ae0c97fa0cc3:04b6d7802d9043cbb09ceb31fd68987b |
| None         | 1a0486c8d8664739b082ae0c97fa0cc3:04b6d7802d9043cbb09ceb31fd68987b |
| None         | 1a0486c8d8664739b082ae0c97fa0cc3:04b6d7802d9043cbb09ceb31fd68987b |
+--------------+-------------------------------------------------------------------+

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

ubuntu@dlp ~(keystone)$
openstack metric resource show 530698ed-413e-4bda-b02e-8f6f60380bd1

+-----------------------+-------------------------------------------------------------------+
| Field                 | Value                                                             |
+-----------------------+-------------------------------------------------------------------+
| created_by_project_id | 04b6d7802d9043cbb09ceb31fd68987b                                  |
| created_by_user_id    | 1a0486c8d8664739b082ae0c97fa0cc3                                  |
| creator               | 1a0486c8d8664739b082ae0c97fa0cc3:04b6d7802d9043cbb09ceb31fd68987b |
| ended_at              | None                                                              |
| id                    | 530698ed-413e-4bda-b02e-8f6f60380bd1                              |
| metrics               | cpu: e99cc743-77e4-4bf8-84c1-9e4851ca6e49                         |
|                       | disk.ephemeral.size: f740924f-2dd0-415a-8a5e-643986e91614         |
|                       | disk.root.size: 33dec344-3f58-4941-b865-4c523b6ada71              |
|                       | memory.usage: 1bc5a709-4caa-42fa-a29b-5ca52506c48c                |
|                       | memory: e1c3de14-a0ee-4ce2-a488-5a00c089e52d                      |
|                       | vcpus: 8ef58da4-a537-4fd2-979c-2f68fd654d55                       |
| original_resource_id  | 530698ed-413e-4bda-b02e-8f6f60380bd1                              |
| project_id            | f30cd546632e484cb24414d83207694b                                  |
| revision_end          | None                                                              |
| revision_start        | 2023-10-10T00:07:31.776545+00:00                                  |
| started_at            | 2023-10-10T00:07:31.776539+00:00                                  |
| type                  | instance                                                          |
| user_id               | 470c9323dad64bbea8fb5ecca6381f72                                  |
+-----------------------+-------------------------------------------------------------------+

# CPU

ubuntu@dlp ~(keystone)$
openstack metric measures show e99cc743-77e4-4bf8-84c1-9e4851ca6e49

+---------------------------+-------------+----------------+
| timestamp                 | granularity |          value |
+---------------------------+-------------+----------------+
| 2023-10-10T09:10:00+09:00 |       300.0 | 203350000000.0 |
| 2023-10-10T09:15:00+09:00 |       300.0 | 495410000000.0 |
+---------------------------+-------------+----------------+

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

ubuntu@dlp ~(keystone)$
openstack metric measures show 1bc5a709-4caa-42fa-a29b-5ca52506c48c

+---------------------------+-------------+--------------+
| timestamp                 | granularity |        value |
+---------------------------+-------------+--------------+
| 2023-10-10T09:10:00+09:00 |       300.0 | 423.73046875 |
| 2023-10-10T09:15:00+09:00 |       300.0 | 422.35546875 |
+---------------------------+-------------+--------------+

# [instance_network_interface] का विवरण

ubuntu@dlp ~(keystone)$
openstack metric resource show 08fd4272-e83e-5e79-8a9a-05905598f8a5

+-----------------------+-----------------------------------------------------------------------+
| Field                 | Value                                                                 |
+-----------------------+-----------------------------------------------------------------------+
| created_by_project_id | 04b6d7802d9043cbb09ceb31fd68987b                                      |
| created_by_user_id    | 1a0486c8d8664739b082ae0c97fa0cc3                                      |
| creator               | 1a0486c8d8664739b082ae0c97fa0cc3:04b6d7802d9043cbb09ceb31fd68987b     |
| ended_at              | None                                                                  |
| id                    | 08fd4272-e83e-5e79-8a9a-05905598f8a5                                  |
| metrics               | network.incoming.bytes: 740afe31-8656-4181-b71e-3f468244cfa3          |
|                       | network.incoming.packets: bf413675-9121-4258-bc82-e61db208ccbc        |
|                       | network.outgoing.bytes: 1660c109-2807-4c5d-97f7-5b5f4f08bcd3          |
|                       | network.outgoing.packets: f2dcf0c3-bd2e-4e7c-b33e-88048970f282        |
| original_resource_id  | instance-00000001-530698ed-413e-4bda-b02e-8f6f60380bd1-tapbfc2108d-94 |
| project_id            | f30cd546632e484cb24414d83207694b                                      |
| revision_end          | None                                                                  |
| revision_start        | 2023-10-10T00:11:48.469917+00:00                                      |
| started_at            | 2023-10-10T00:11:48.469911+00:00                                      |
| type                  | instance_network_interface                                            |
| user_id               | 470c9323dad64bbea8fb5ecca6381f72                                      |
+-----------------------+-----------------------------------------------------------------------+

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

ubuntu@dlp ~(keystone)$
openstack metric measures show 740afe31-8656-4181-b71e-3f468244cfa3

+---------------------------+-------------+----------+
| timestamp                 | granularity |    value |
+---------------------------+-------------+----------+
| 2023-10-10T09:10:00+09:00 |       300.0 | 752245.0 |
| 2023-10-10T09:15:00+09:00 |       300.0 | 753869.0 |
+---------------------------+-------------+----------+

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

ubuntu@dlp ~(keystone)$
openstack metric measures show 1660c109-2807-4c5d-97f7-5b5f4f08bcd3

+---------------------------+-------------+------------+
| timestamp                 | granularity |      value |
+---------------------------+-------------+------------+
| 2023-10-10T09:10:00+09:00 |       300.0 | 50797744.0 |
| 2023-10-10T09:15:00+09:00 |       300.0 | 50799680.0 |
+---------------------------+-------------+------------+
मिलान सामग्री