This documentation is for a release that is no longer maintained
See documentation for the latest supported version 3 or the latest supported version 4.12.3. 收集集群日志记录数据
您可使用 oc adm must-gather
CLI 命令来收集有关集群日志记录环境的信息。
流程
使用 must-gather
收集集群日志记录信息:
-
进入要存储
must-gather
信息的目录。 针对集群日志记录镜像运行
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}')
$ 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}')
Copy to Clipboard Copied! Toggle word wrap Toggle overflow must-gather
工具会创建一个以当前目录中must-gather.local
开头的新目录。例如:must-gather.local.4157245944708210408
。从刚刚创建的
must-gather
目录创建一个压缩文件。例如,在使用 Linux 操作系统的计算机上运行以下命令:tar -cvaf must-gather.tar.gz must-gather.local.4157245944708210408
$ tar -cvaf must-gather.tar.gz must-gather.local.4157245944708210408
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - 在红帽客户门户中为您的问题单附上压缩文件。