4.6. 使用 Insights Operator

Insights Operator 会定期收集配置和组件故障状态信息,默每两小时向红帽报告这些数据。这些信息可让红帽评估配置,它提供了比 Telemetry 报告更深入的数据。OpenShift Container Platform 用户可以在 Red Hat Hybrid Cloud Console 上的 Insights Advisor 服务中显示报告。

其他资源

4.6.1. 下载 Insights Operator 存档

Insights Operator 将收集的数据存储在集群的 openshift-insights 命名空间中的存档中。您可以下载并查看 Insights Operator 收集的数据。

先决条件

  • 使用具有 cluster-admin 角色的用户访问集群。

流程

  1. 为 Insights Operator 查找正在运行的 pod 的名称:

    $ oc get pods --namespace=openshift-insights -o custom-columns=:metadata.name --no-headers  --field-selector=status.phase=Running
  2. 复制 Insights Operator 收集的最近数据存档:

    $ oc cp openshift-insights/<insights_operator_pod_name>:/var/lib/insights-operator ./insights-data 1
    1
    <insights_operator_pod_name> 替换为上一命令中的 pod 名称输出。

Insights Operator 最近存档可在 insights-data 目录中找到。

4.6.2. 查看 Insights Operator 收集持续时间

您可以查看 Insights Operator 收集存档中包含的信息所使用的时间。这有助于您了解 Insights Operator 资源使用情况和 Insights Advisor 的问题。

先决条件

  • Insights Operator 归档的最新副本。

流程

  1. 在归档中,打开 /insights-operator/gathers.json

    文件包含 Insights Operator 收集操作列表:

        {
          "name": "clusterconfig/authentication",
          "duration_in_ms": 730, 1
          "records_count": 1,
          "errors": null,
          "panic": null
        }
    1
    duration_in_ms 是每个收集操作的时间(毫秒)。
  2. 检查每个收集操作是否有异常情况。