4.5. 使用 Insights Operator
Insights Operator 会定期收集配置和组件故障状态信息,默每两小时向红帽报告这些数据。这些信息可让红帽评估配置,它提供了比 Telemetry 报告更深入的数据。OpenShift Container Platform 用户可以在 Red Hat Hybrid Cloud Console 上的 Insights Advisor 服务中显示报告。
4.5.1. 下载 Insights Operator 存档 复制链接链接已复制到粘贴板!
Insights Operator 将收集的数据存储在集群的 openshift-insights 命名空间中的存档中。您可以下载并查看 Insights Operator 收集的数据。
先决条件
-
使用具有
cluster-admin角色的用户访问集群。
流程
为 Insights Operator 查找正在运行的 pod 的名称:
oc get pods --namespace=openshift-insights -o custom-columns=:metadata.name --no-headers --field-selector=status.phase=Running
$ oc get pods --namespace=openshift-insights -o custom-columns=:metadata.name --no-headers --field-selector=status.phase=RunningCopy to Clipboard Copied! Toggle word wrap Toggle overflow 复制 Insights Operator 收集的最近数据存档:
oc cp openshift-insights/<insights_operator_pod_name>:/var/lib/insights-operator ./insights-data
$ oc cp openshift-insights/<insights_operator_pod_name>:/var/lib/insights-operator ./insights-data1 Copy to Clipboard Copied! Toggle word wrap Toggle overflow - 1
- 将
<insights_operator_pod_name>替换为上一命令中的 pod 名称输出。
Insights Operator 最近存档可在 insights-data 目录中找到。
4.5.2. 查看 Insights Operator 收集持续时间 复制链接链接已复制到粘贴板!
您可以查看 Insights Operator 收集存档中包含的信息所使用的时间。这有助于您了解 Insights Operator 资源使用情况和 Insights Advisor 的问题。
先决条件
- Insights Operator 归档的最新副本。
流程
在归档中,打开
/insights-operator/gathers.json。文件包含 Insights Operator 收集操作列表:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - 1
duration_in_ms是每个收集操作的时间(毫秒)。
- 检查每个收集操作是否有异常情况。