12.4.3. 收集 OpenShift Logging 数据

您可以使用 oc adm must-gather CLI 命令来收集有关 OpenShift Logging 环境的信息。

流程

使用 must-gather 来收集 OpenShift Logging 信息:

  1. 进入要存储 must-gather 信息的目录。
  2. 针对 OpenShift Logging 镜像运行 oc adm must-gather 命令:

    $ oc adm must-gather --image=$(oc -n openshift-logging get deployment.apps/cluster-logging-operator -o jsonpath='{.spec.template.spec.containers[?(@.name == "cluster-logging-operator")].image}')

    must-gather 工具会创建一个以当前目录中 must-gather.local 开头的新目录。例如: must-gather.local.4157245944708210408

  3. 从刚刚创建的 must-gather 目录创建一个压缩文件。例如,在使用 Linux 操作系统的计算机上运行以下命令:

    $ tar -cvaf must-gather.tar.gz must-gather.local.4157245944708210408
  4. 红帽客户门户中为您的问题单附上压缩文件。