Ubuntu 24.04
Sponsored Link

OpenStack Caracal : Ceilometer का उपयोग कैसे करें (Glance)2024/05/23

 

Glance सेवा के लिए 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  |  |  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] टेलीमेट्री डेटा संग्रह को सक्षम करने के लिए Glance सेवा के लिए सेटिंग्स निम्नानुसार बदलें।
root@dlp ~(keystone)#
vi /etc/glance/glance-api.conf
# अंत में जोड़ें

[oslo_messaging_notifications]
driver = messagingv2
# RabbitMQ कनेक्शन जानकारी
transport_url = rabbit://openstack:password@dlp.srv.world
root@dlp ~(keystone)#
systemctl restart glance-api

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

root@dlp ~(keystone)#
openstack metric resource list

+----------+----------+------------+----------+----------------------+------------+----------+----------------+--------------+---------------+
| id       | type     | project_id | user_id  | original_resource_id | started_at | ended_at | revision_start | revision_end | creator       |
+----------+----------+------------+----------+----------------------+------------+----------+----------------+--------------+---------------+
| 7b62cecc | instance | 3ce0a73a1d | b6fe4e93 | 7b62cecc-c2a7-44ae-  | 2024-08-   | None     | 2024-08-       | None         | 945771dad24c4 |
| -c2a7-   |          | 5445409ded | e8464cc7 | 9370-e64cde495598    | 08T08:41:5 |          | 08T08:41:55.92 |              | cfcbda6824e66 |
| 44ae-    |          | f1d0569e45 | 89f4b7ac |                      | 5.923069+0 |          | 3074+00:00     |              | e2d8d4:096c64 |
| 9370-    |          | 20         | 10250927 |                      | 0:00       |          |                |              | a21a3d4ac5a47 |
| e64cde49 |          |            |          |                      |            |          |                |              | 53969830f0744 |
| 5598     |          |            |          |                      |            |          |                |              |               |
| 160f4e28 | instance | 046a496e1a | a6790fc7 | 160f4e28-02aa-4ce5-  | 2024-08-   | None     | 2024-08-       | None         | 945771dad24c4 |
| -02aa-   |          | 124ae582f8 | 02b74926 | 81e2-a1c3df036ef7    | 08T08:41:5 |          | 08T08:41:55.92 |              | cfcbda6824e66 |
| 4ce5-    |          | 3bfd80339d | 9d410492 |                      | 5.924598+0 |          | 4603+00:00     |              | e2d8d4:096c64 |
| 81e2-    |          | 95         | 3d0b867d |                      | 0:00       |          |                |              | a21a3d4ac5a47 |
| a1c3df03 |          |            |          |                      |            |          |                |              | 53969830f0744 |
| 6ef7     |          |            |          |                      |            |          |                |              |               |
+----------+----------+------------+----------+----------------------+------------+----------+----------------+--------------+---------------+

root@dlp ~(keystone)#
openstack image list

+--------------------------------------+------------+--------+
| ID                                   | Name       | Status |
+--------------------------------------+------------+--------+
| 3c2414b7-050c-45b3-abcf-d08cf6c335bc | Ubuntu2404 | active |
+--------------------------------------+------------+--------+

# एक छवि डाउनलोड करने के लिए परीक्षण करें

root@dlp ~(keystone)#
openstack image save --file ubuntu2404.qcow2 Ubuntu2404

# एक छवि जोड़ने के लिए परीक्षण करें

root@dlp ~(keystone)#
openstack image create "Ubuntu2404-2" --file ubuntu2404.qcow2 --disk-format qcow2 --container-format bare --public

# संसाधनों की सूची बनाएं

root@dlp ~(keystone)#
openstack metric resource list

+----------+----------+------------+----------+----------------------+------------+----------+----------------+--------------+---------------+
| id       | type     | project_id | user_id  | original_resource_id | started_at | ended_at | revision_start | revision_end | creator       |
+----------+----------+------------+----------+----------------------+------------+----------+----------------+--------------+---------------+
| 7b62cecc | instance | 3ce0a73a1d | b6fe4e93 | 7b62cecc-c2a7-44ae-  | 2024-08-   | None     | 2024-08-       | None         | 945771dad24c4 |
| -c2a7-   |          | 5445409ded | e8464cc7 | 9370-e64cde495598    | 08T08:41:5 |          | 08T08:41:55.92 |              | cfcbda6824e66 |
| 44ae-    |          | f1d0569e45 | 89f4b7ac |                      | 5.923069+0 |          | 3074+00:00     |              | e2d8d4:096c64 |
| 9370-    |          | 20         | 10250927 |                      | 0:00       |          |                |              | a21a3d4ac5a47 |
| e64cde49 |          |            |          |                      |            |          |                |              | 53969830f0744 |
| 5598     |          |            |          |                      |            |          |                |              |               |
| 160f4e28 | instance | 046a496e1a | a6790fc7 | 160f4e28-02aa-4ce5-  | 2024-08-   | None     | 2024-08-       | None         | 945771dad24c4 |
| -02aa-   |          | 124ae582f8 | 02b74926 | 81e2-a1c3df036ef7    | 08T08:41:5 |          | 08T08:41:55.92 |              | cfcbda6824e66 |
| 4ce5-    |          | 3bfd80339d | 9d410492 |                      | 5.924598+0 |          | 4603+00:00     |              | e2d8d4:096c64 |
| 81e2-    |          | 95         | 3d0b867d |                      | 0:00       |          |                |              | a21a3d4ac5a47 |
| a1c3df03 |          |            |          |                      |            |          |                |              | 53969830f0744 |
| 6ef7     |          |            |          |                      |            |          |                |              |               |
| df93d330 | image    | 046a496e1a | None     | df93d330-0a84-42c4-  | 2024-08-   | None     | 2024-08-       | None         | 945771dad24c4 |
| -0a84-   |          | 124ae582f8 |          | 96b7-8ff50aaf12a7    | 08T09:17:3 |          | 08T09:17:31.64 |              | cfcbda6824e66 |
| 42c4-    |          | 3bfd80339d |          |                      | 1.644178+0 |          | 4183+00:00     |              | e2d8d4:096c64 |
| 96b7-    |          | 95         |          |                      | 0:00       |          |                |              | a21a3d4ac5a47 |
| 8ff50aaf |          |            |          |                      |            |          |                |              | 53969830f0744 |
| 12a7     |          |            |          |                      |            |          |                |              |               |
+----------+----------+------------+----------+----------------------+------------+----------+----------------+--------------+---------------+

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

root@dlp ~(keystone)#
openstack metric resource show df93d330-0a84-42c4-96b7-8ff50aaf12a7

+-----------------------+------------------------------------------------------+
| Field                 | Value                                                |
+-----------------------+------------------------------------------------------+
| created_by_project_id | 096c64a21a3d4ac5a4753969830f0744                     |
| created_by_user_id    | 945771dad24c4cfcbda6824e66e2d8d4                     |
| creator               | 945771dad24c4cfcbda6824e66e2d8d4:096c64a21a3d4ac5a47 |
|                       | 53969830f0744                                        |
| ended_at              | None                                                 |
| id                    | df93d330-0a84-42c4-96b7-8ff50aaf12a7                 |
| metrics               | image.size: 7dc69776-eac4-4877-8d86-3cf7de5cbce6     |
| original_resource_id  | df93d330-0a84-42c4-96b7-8ff50aaf12a7                 |
| project_id            | 046a496e1a124ae582f83bfd80339d95                     |
| revision_end          | None                                                 |
| revision_start        | 2024-08-08T09:17:31.644183+00:00                     |
| started_at            | 2024-08-08T09:17:31.644178+00:00                     |
| type                  | image                                                |
| user_id               | None                                                 |
+-----------------------+------------------------------------------------------+

# छवि आकार डेटा प्रदर्शित करें

root@dlp ~(keystone)#
openstack metric measures show 7dc69776-eac4-4877-8d86-3cf7de5cbce6

+---------------------------+-------------+-------------+
| timestamp                 | granularity |       value |
+---------------------------+-------------+-------------+
| 2024-08-08T09:15:00+00:00 |       300.0 | 589692928.0 |
+---------------------------+-------------+-------------+
मिलान सामग्री