3.2. 安装 Gnocchi


默认情况下,在 undercloud 上不启用 Gnocchi。红帽不推荐在 undercloud 上启用 Telemetry,因为它会生成很多 undercloud 无法处理的数据,因为资源和单点故障。

默认情况下,Telemetry 和 Gnocchi 安装在控制器和 Compute 节点上。Gnocchi 的默认存储后端为 file。

您可以通过以下两种方式之一在 overcloud 上部署 Gnocchi:

3.2.1. 在内部部署 Gnocchi

默认部署为 internal。

流程

  • 要部署 collectd 以向内部 Gnocchi 发送指标数据,请将 /usr/share/openstack-tripleo-heat-templates/environments/services/collectd.yaml 添加到 overcloud deploy 命令。

其他资源

3.2.2. 在外部部署 Gnocchi

流程

  1. 在本地目录中创建自定义 YAML 文件,如 ExternalGnocchi.yaml,并确保您包含以下详情:

    CollectdGnocchiServer: <IPofExternalServer>
    CollectdGnocchiUser: admin
    CollectdGnocchiAuth: basic
  2. 若要部署 Gnocchi,请将自定义 YAML 文件添加到 overcloud deploy 命令中。使用 <existing_overcloud_environment_files> 属于现有部署一部分的环境文件列表替换。

    openstack overcloud deploy \
    -e <existing_overcloud_environment_files> \
    -e /usr/share/openstack-tripleo-heat-templates/environments/services/collectd.yaml \
    -e /home/templates/environments/ExternalGnocchi.yaml \
    ...
    注意

    您可以在以下 YAML 文件中找到所有 Gnocchi 参数: /usr/share/openstack-tripleo-heat-templates/puppet/services/metrics/collectd.yaml

3.2.3. 验证 Gnocchi 部署

流程

  • 列出新资源和指标:

    $ (overcloud) [stack@undercloud-0 ~]$ openstack metric  metric list |more
    +--------------------------------------+---------------------+--------------------------------------------------+------+-------------------------------------+
    | id                            | archive_policy/name | name                                   | unit | resource_id                      	|
    +--------------------------------------+---------------------+--------------------------------------------------+------+-------------------------------------+
    | 001715fe-8ad1-4f21-b0fa-1dee2b1c8201 | low   | interface-eth4@if_packets-rx 	| None | e1357192-e563-5524-b0f0-b30fd11ea8df |
    | 003057df-0271-4c59-b793-f885fe09668a | low   | pconns-6000-local@tcp_connections-LISTEN   | None | 33ac72d9-ab4d-54f1-9fcf-56e02f770b70 |
    | 0030a5ba-0e4a-4cce-a48b-4122bfbc4e7a | low  | tcpconns-8004-local@tcp_connections-CLOSING  	| None | 54b1ecb3-5ccf-533f-84ab-e86eb426606f |
    | 0030e0a7-2cea-42db-860c-fa9ab175c8e1 | low  | tcpconns-25-local@tcp_connections-CLOSING    	| None | 54b1ecb3-5ccf-533f-84ab-e86eb426606f |
    | 007ec848-f16a-48b8-8706-742a28e2efcf | low    | memcached-local@memcached_command-get        	| None | 8900c37d-501a-565d-b38c-85e5a07a0463 |
    | 009d08c7-7483-4e0a-b1bd-0b1451a3b2ab | low | tcpconns-8041-local@tcp_connections-TIME_WAIT	| None | caac8e14-0a2f-5e31-b4bd-e07a14361d81 |
    | 00a8183c-910e-4849-8d08-9401fbe82029 | low  | tcpconns-11211-local@tcp_connections-CLOSING 	| None | 54b1ecb3-5ccf-533f-84ab-e86eb426606f |
    | 010af93c-62be-442a-94da-5cb426053fe8 | low   | tcpconns-4567-local@tcp_connections-FIN_WAIT2	| None | caac8e14-0a2f-5e31-b4bd-e07a14361d81 |
    | 0113b4f3-786d-4a0a-bb4b-59417d63b60f | low   | tcpconns-38857-local@tcp_connections-LAST_ACK	| None | caac8e14-0a2f-5e31-b4bd-e07a14361d81 |
    | 0128dac7-b237-4e4c-8d5f-83f6e53771b4 | low   | tcpconns-37871-local@tcp_connections-SYN_SENT	| None | caac8e14-0a2f-5e31-b4bd-e07a14361d81 |
    | 014ca1f7-565d-4ce7-b35f-52fd916a8b06 | low    | tcpconns-43752-local@tcp_connections-TIME_WAIT   | None | caac8e14-0a2f-5e31-b4bd-e07a14361d81 |
    | 0154f901-18c2-4dd9-a593-db26d356611a | low  | tcpconns-1993-local@tcp_connections-CLOSED   	| None | 54b1ecb3-5ccf-533f-84ab-e86eb426606f |
    | 0158d618-d3ba-45e8-bce8-33411d6f35e3 | low    | tcpconns-111-local@tcp_connections-CLOSED    	| None | e1357192-e563-5524-b0f0-b30fd11ea8df |
    | 016fe93f-2794-490e-8057-fd5ab75eb4ec | low      | tcpconns-6001-local@tcp_connections-SYN_RECV 	| None | 54b1ecb3-5ccf-533f-84ab-e86eb426606f |
    | 01ce3b82-98ad-4f61-88d0-ba46b9862688 | low    | interface-br-tenant@if_dropped-rx            	| None | caac8e14-0a2f-5e31-b4bd-e07a14361d81 |
    | 01d4d186-cf26-4264-87a0-9f5deb8872b5 | low     | tcpconns-8774-local@tcp_connections-ESTABLISHED  | None | 33ac72d9-ab4d-54f1-9fcf-56e02f770b70 |
    | 01f19617-3ef6-43e8-9ad8-8c84b923f13f | low       | tcpconns-43394-local@tcp_connections-FIN_WAIT2   | None | 33ac72d9-ab4d-54f1-9fcf-56e02f770b70 |
    | 020646e9-2d50-4126-9a63-a5f36180cc0b | low     | tcpconns-6000-local@tcp_connections-CLOSE_WAIT   | None | caac8e14-0a2f-5e31-b4bd-e07a14361d81 |
    | 02155fd3-0d68-4eec-8cd5-8b158f5f03a4 | low        | tcpconns-6633-local@tcp_connections-LISTEN   	| None | 33ac72d9-ab4d-54f1-9fcf-56e02f770b70 |
    | 0236355e-3415-4a72-99f2-38ada7b3db68 | low      | tcpconns-43806-local@tcp_connections-FIN_WAIT2   | None | 54b1ecb3-5ccf-533f-84ab-e86eb426606f |
    | 024e89d2-aa77-49c0-ae6e-65a665db01b3 | low      | tcpconns-35357-local@tcp_connections-FIN_WAIT2   | None | caac8e14-0a2f-5e31-b4bd-e07a14361d81 |
    | 027adb62-272f-4331-8167-28c3489d3b44 | low       | tcpconns-9292-local@tcp_connections-LISTEN   	| None | 33ac72d9-ab4d-54f1-9fcf-56e02f770b70 |
    | 0290d15e-7687-4683-bd25-4c030cad12cf | low       | tcpconns-37378-local@tcp_connections-CLOSE_WAIT  | None | 54b1ecb3-5ccf-533f-84ab-e86eb426606f |
    | 02a5383f-b061-4422-9570-bfd3b2532832 | low        | processes@ps_state-zombies                   	| None | 33ac72d9-ab4d-54f1-9fcf-56e02f770b70 |
    | 02c959d5-8ae2-4d14-a140-189530b4e8f6 | low        | disk-vda2@disk_merged-write                  	| None | caac8e14-0a2f-5e31-b4bd-e07a14361d81 |
    | 02d174b5-6783-4db5-bfe7-8d45931aa0b0 | low        | interface-br-tun@if_octets-rx                	| None | 54b1ecb3-5ccf-533f-84ab-e86eb426606f |
    | 02d8c001-90da-4997-bfa5-e5d3afe599fa | low          | tcpconns-25672-local@tcp_connections-CLOSING 	| None | 54b1ecb3-5ccf-533f-84ab-e86eb426606f |
    | 02d932f0-5745-4694-86d9-84e365789a7d | low       | tcpconns-9292-local@tcp_connections-CLOSING  	| None | caac8e14-0a2f-5e31-b4bd-e07a14361d81 |
    | 02e1a5e2-194d-4e49-8b36-a843b5dbdc3d | low       | tcpconns-45228-local@tcp_connections-CLOSE_WAIT  | None | caac8e14-0a2f-5e31-b4bd-e07a14361d81 |
    | 02e5dcec-f5b7-41e9-9f3c-714ade502836 | low         | load@load-5min                               	| None | 54b1ecb3-5ccf-533f-84ab-e86eb426606f |
    | 02fe05ed-e4a5-4a18-ad6c-64f8787225c9 | low         | tcpconns-8774-local@tcp_connections-SYN_SENT 	| None | 33ac72d9-ab4d-54f1-9fcf-56e02f770b70 |
    | 03129089-7bbd-47f3-ab14-9cd583d775ae | low        | tcpconns-6379-local@tcp_connections-LAST_ACK 	| None | 54b1ecb3-5ccf-533f-84ab-e86eb426606f |
    | 032b1771-93c4-4051-bbec-9115c9d329c4 | low        | tcpconns-8042-local@tcp_connections-TIME_WAIT	| None | 54b1ecb3-5ccf-533f-84ab-e86eb426606f |
    | 033516d5-ac15-4767-b005-cff52276badd | low        | tcpconns-22-local@tcp_connections-CLOSED     	| None | 54b1ecb3-5ccf-533f-84ab-e86eb426606f |
    | 03589183-efa7-43ed-aea6-9d3c8accf97a | low         | interface-br-tun@if_errors-tx                	| None | 54b1ecb3-5ccf-533f-84ab-e86eb426606f |
    | 0360077f-729d-4591-a9fc-d96fbb7e0326 | low          | tcpconns-6080-local@tcp_connections-CLOSING  	| None | 33ac72d9-ab4d-54f1-9fcf-56e02f770b70 |
    | 0365f5a1-4a98-435e-a809-c8706b0671bd | low        | tcpconns-34296-local@tcp_connections-LAST_ACK	| None | 33ac72d9-ab4d-54f1-9fcf-56e02f770b70 |
    | 039c57b7-ae5b-4f13-846e-8e5f184cdc4d | low         | tcpconns-111-local@tcp_connections-CLOSE_WAIT	| None | 926d87fe-b388-501d-afa6-dc6af55ce4ad |
    | 04169046-80c4-478e-b263-b9529b5ca739 | low       | interface-br-tenant@if_packets-tx            	| None | 54b1ecb3-5ccf-533f-84ab-e86eb426606f |
    | 0432314d-eb8b-4bf9-ab8f-5ecc5b30592d | low         | tcpconns-37415-local@tcp_connections-CLOSE_WAIT  | None | caac8e14-0a2f-5e31-b4bd-e07a14361d81 |
    | 043d9d6e-5db0-40e4-83b1-b8120506e9ec | low        | tcpconns-6379-local@tcp_connections-ESTABLISHED  | None | caac8e14-0a2f-5e31-b4bd-e07a14361d81 |
    | 04639fe9-6dc1-46eb-8b86-9b39e8fd782d | low          | tcpconns-35357-local@tcp_connections-SYN_RECV	| None | caac8e14-0a2f-5e31-b4bd-e07a14361d81 |
    | 04871c86-b176-45ed-9f37-bb6fae27e930 | low          | tcpconns-8042-local@tcp_connections-CLOSE_WAIT   | None | caac8e14-0a2f-5e31-b4bd-e07a14361d81 |
    | 049c50c4-bf5e-4098-988a-fb867649ee17 | low          | tcpconns-11211-local@tcp_connections-SYN_SENT	| None | 54b1ecb3-5ccf-533f-84ab-e86eb426606f |
    | 04e37efb-fc67-418e-b53b-6b8055967a2a | low          | tcpconns-8004-local@tcp_connections-CLOSING  	| None | 33ac72d9-ab4d-54f1-9fcf-56e02f770b70 |
    | 04ef0d0f-db22-4501-ae4a-4bc9ee719075 | low           | tcpconns-9200-local@tcp_connections-SYN_RECV 	| None | 33ac72d9-ab4d-54f1-9fcf-56e02f770b70 |
Red Hat logoGithubRedditYoutube

关于红帽文档

通过我们的产品和服务,以及可以信赖的内容,帮助红帽用户创新并实现他们的目标。

让开源更具包容性

红帽致力于替换我们的代码、文档和 Web 属性中存在问题的语言。欲了解更多详情,请参阅红帽博客.

關於紅帽

我们提供强化的解决方案,使企业能够更轻松地跨平台和环境(从核心数据中心到网络边缘)工作。

© 2024 Red Hat, Inc.