注意

本文档适用于 Ceph 的开发版本。

遥测模块

遥测模块将有关集群的匿名数据发送回开发者,以报告 Ceph 的使用情况以及用户遇到的问题。

此数据在公共仪表板上可视化,允许社区查看统计摘要,包括有多少集群正在报告、它们的总容量和 OSD 计数以及版本分布趋势。

通道

遥测报告分为几个“通道”,每个通道包含不同类型的信息。启用遥测时,可以单独打开和关闭各个通道。(如果禁用遥测,则按通道设置无效。)

  • basic(默认:on):有关集群的基本信息

    • 集群容量

    • 监视器 (Monitors)、管理器 (Managers)、OSD、MDS、对象网关或其他守护程序的数量

    • 当前使用的软件版本

    • RADOS 池和 CephFS 文件系统的数量和类型

    • 已更改配置选项的名称(但包括其值)

  • crash(默认:on):有关守护程序崩溃的信息,包括

    • 守护程序类型

    • 守护程序版本

    • 操作系统(OS 发行版、内核版本)

    • 堆栈跟踪,标识崩溃发生在 Ceph 代码中的位置

  • device(默认:on):有关设备指标的信息,包括

    • 匿名化 SMART 指标

  • ident(默认:off):用户提供的有关集群的标识信息

    • 集群描述

    • 联系电子邮件地址

  • perf(默认:off):集群的各种性能指标,可用于

    • 揭示整体集群健康状况

    • 识别工作负载模式

    • 排查延迟、限制、内存管理等方面的问题

    • 按守护程序监控集群性能

报告的数据包含任何敏感数据。这意味着报告的数据不包括池名称、对象名称、对象内容、主机名或设备序列号。

报告的数据包含与集群部署方式、Ceph 版本、OS 发行版和其他有助于项目更好地了解 Ceph 使用方式的参数相关的计数器和统计信息。

数据通过安全连接发送至 https://telemetry.ceph.com

可以通过运行以下命令启用或禁用单个通道

ceph telemetry enable channel basic
ceph telemetry enable channel crash
ceph telemetry enable channel device
ceph telemetry enable channel ident
ceph telemetry enable channel perf

ceph telemetry disable channel basic
ceph telemetry disable channel crash
ceph telemetry disable channel device
ceph telemetry disable channel ident
ceph telemetry disable channel perf

可以通过运行以下形式的命令同时启用或禁用多个通道

ceph telemetry enable channel basic crash device ident perf
ceph telemetry disable channel basic crash device ident perf

可以通过运行以下命令一次启用或禁用所有通道

ceph telemetry enable channel all
ceph telemetry disable channel all

请注意,遥测必须启用这些命令才能生效。

使用以下命令列出所有通道

ceph telemetry channel ls
NAME      ENABLED    DEFAULT    DESC
basic     ON         ON         Share basic cluster information (size, version)
crash     ON         ON         Share metadata about Ceph daemon crashes (version, stack straces, etc)
device    ON         ON         Share device health metrics (e.g., SMART data, minus potentially identifying info like serial numbers)
ident     OFF        OFF        Share a user-provided description and/or contact email for the cluster
perf      ON         OFF        Share various performance metrics of a cluster

启用遥测

要允许遥测模块共享数据,请运行以下命令

ceph telemetry on

请注意:遥测数据根据 社区数据许可协议 - 共享 - 版本 1.0 获得许可。这意味着只有在将 --license sharing-1-0 添加到 ceph telemetry on 命令后,才能启用遥测模块。启用遥测后,考虑启用默认关闭的通道,例如 perf 通道。ceph telemetry on 的输出将列出启用这些通道的确切命令。

可以通过运行以下命令随时禁用遥测

ceph telemetry off

示例报告

通过运行以下命令显示报告的数据

ceph telemetry show

如果禁用遥测,请运行以下命令以预览示例报告

ceph telemetry preview

为较大的集群生成示例报告可能需要一些时间。

为了保护敏感信息,设备报告是单独生成的。包括主机名和设备序列号在内的数据是匿名的。设备遥测数据发送到不同的端点,并且不会将设备数据与特定集群相关联。要查看设备报告的预览,请运行以下命令

ceph telemetry show-device

如果禁用遥测,请运行以下命令以预览示例设备报告

ceph telemetry preview-device

注意

必须安装 smartmontools 版本 7.0 或更高版本,以便可以指定和解析 JSON 输出。如果您对此报告中包含的信息有任何隐私方面的担忧,请联系 Ceph 开发者。

启用遥测时,运行以下命令以在单个输出中生成两个报告

ceph telemetry show-all

禁用遥测时,运行以下命令以在单个输出中查看两个报告

ceph telemetry preview-all

按通道查看示例报告

启用遥测时运行以下命令以显示指定通道报告的数据

ceph telemetry show <channel_name>

请注意:如果遥测已启用,并且 <channel_name> 已禁用,则上述命令将根据用户已注册的集合输出该通道的示例报告。但是,由于通道已禁用,因此不会报告此数据。

如果遥测已关闭,您可以使用以下命令预览按通道查看的示例报告

ceph telemetry preview <channel_name>

集合

集合代表在通道内收集的数据的不同方面。

要列出所有集合,请运行以下命令

ceph telemetry collection ls
NAME                            STATUS                                               DESC
basic_base                      NOT REPORTING: NOT OPTED-IN                          Basic information about the cluster (capacity, number and type of daemons, version, etc.)
basic_mds_metadata              NOT REPORTING: NOT OPTED-IN                          MDS metadata
basic_pool_flags                NOT REPORTING: NOT OPTED-IN                          Per-pool flags
basic_pool_options_bluestore    NOT REPORTING: NOT OPTED-IN                          Per-pool bluestore config options
basic_pool_usage                NOT REPORTING: NOT OPTED-IN                          Default pool application and usage statistics
basic_rook_v01                  NOT REPORTING: NOT OPTED-IN                          Basic Rook deployment data
basic_stretch_cluster           NOT REPORTING: NOT OPTED-IN                          Stretch Mode information for stretch clusters deployments
basic_usage_by_class            NOT REPORTING: NOT OPTED-IN                          Default device class usage statistics
crash_base                      NOT REPORTING: NOT OPTED-IN                          Information about daemon crashes (daemon type and version, backtrace, etc.)
device_base                     NOT REPORTING: NOT OPTED-IN                          Information about device health metrics
ident_base                      NOT REPORTING: NOT OPTED-IN, CHANNEL ident IS OFF    User-provided identifying information about the cluster
perf_memory_metrics             NOT REPORTING: NOT OPTED-IN, CHANNEL perf IS OFF     Heap stats and mempools for mon and mds
perf_perf                       NOT REPORTING: NOT OPTED-IN, CHANNEL perf IS OFF     Information about performance counters of the cluster

其中

名称

集合名称。前缀表示集合所属的通道。

状态

指示是否报告集合指标。这由集合所属通道的状态(enableddisabled)以及集合的注册状态(用户是否选择加入此集合)决定。

描述

集合的一般描述。

要显示当前已注册的集合与任何新的或可用集合之间的任何差异,请运行以下命令

ceph telemetry diff

要注册最新的集合,请运行以下命令

ceph telemetry on

通过运行以下形式的命令启用当前禁用的新通道

ceph telemetry enable channel <channel_name>

间隔

遥测模块默认每 24 小时编译并发送一次新报告。通过运行以下形式的命令调整此间隔

ceph config set mgr mgr/telemetry/interval 72    # report every three days

状态

要打印遥测模块的当前配置,请运行以下形式的命令

ceph telemetry status

手动发送遥测数据

要发送异步的、一次性的遥测数据,请运行以下命令

ceph telemetry send

如果尚未启用遥测(通过运行命令 ceph telemetry on),请将 --license sharing-1-0 添加到 ceph telemetry send 命令中。

通过代理发送遥测数据

如果集群无法直接连接到配置的遥测端点(默认值:telemetry.ceph.com),请通过运行以下形式的命令配置 HTTP/HTTPS 代理服务器

ceph config set mgr mgr/telemetry/proxy https://10.0.0.1:8080

如果需要,通过运行以下形式的命令包含以冒号分隔的用户名和密码(user:pass

ceph config set mgr mgr/telemetry/proxy https://ceph:telemetry@10.0.0.1:8080

联系方式和描述

可以将联系方式和描述添加到报告中。这是可选的,默认情况下禁用。运行以下形式的命令以添加联系方式和描述

ceph config set mgr mgr/telemetry/contact 'John Doe <john.doe@example.com>'
ceph config set mgr mgr/telemetry/description 'My first Ceph cluster'
ceph config set mgr mgr/telemetry/channel_ident true

排行榜

要参与公共仪表板中的排行榜,请运行以下命令

ceph config set mgr mgr/telemetry/leaderboard true

排行榜显示有关集群的基本信息。这包括集群的总存储容量和 OSD 数量。要添加集群描述以便更容易在排行榜上识别它,请运行以下形式的命令

ceph config set mgr mgr/telemetry/leaderboard_description 'Ceph cluster for Computational Biology at the University of XYZ'

如果启用了 ident 通道,则其详细信息将不会显示在排行榜中。

由 Ceph 基金会为您呈现

Ceph 文档是由非营利性 Ceph 基金会 资助和托管的社区资源。如果您希望支持这项工作和我们的其他努力,请考虑 立即加入