1
0
mirror of https://github.com/openshift/openshift-docs.git synced 2026-02-05 12:46:18 +01:00
Files
openshift-docs/modules/migration-using-must-gather.adoc

65 lines
2.4 KiB
Plaintext

// Module included in the following assemblies:
//
// * migrating_from_ocp_3_to_4/troubleshooting-3-4.adoc
// * migration_toolkit_for_containers/troubleshooting-mtc.adoc
:_mod-docs-content-type: PROCEDURE
[id="migration-using-must-gather_{context}"]
= Using the must-gather tool
You can collect logs, metrics, and information about {local-product} custom resources by using the `must-gather` tool.
The `must-gather` data must be attached to all customer cases.
You can collect data for a one-hour or a 24-hour period and view the data with the Prometheus console.
.Prerequisites
* You must be logged in to the {product-title} cluster as a user with the `cluster-admin` role.
* You must have the OpenShift CLI (`oc`) installed.
.Procedure
. Navigate to the directory where you want to store the `must-gather` data.
. Run the `oc adm must-gather` command for one of the following data collection options:
ifdef::troubleshooting-3-4[]
* To collect data for the past hour, run the following command:
+
[source,terminal]
----
$ oc adm must-gather --image=registry.redhat.io/rhmtc/openshift-migration-must-gather-rhel8:v1.7
----
+
This command saves the data as the `must-gather/must-gather.tar.gz` file. You can upload this file to a support case on the link:https://access.redhat.com/[Red Hat Customer Portal].
* To collect data for the past 24 hours, run the following command:
+
[source,terminal]
----
$ oc adm must-gather --image=registry.redhat.io/rhmtc/openshift-migration-must-gather-rhel8:v1.7 -- /usr/bin/gather_metrics_dump
----
+
This operation can take a long time. This command saves the data as the `must-gather/metrics/prom_data.tar.gz` file.
endif::[]
ifdef::troubleshooting-mtc[]
* To collect data for the past 24 hours, run the following command:
+
[source,terminal]
----
$ oc adm must-gather --image=registry.redhat.io/rhmtc/openshift-migration-must-gather-rhel8:v1.8
----
+
This command saves the data as the `must-gather/must-gather.tar.gz` file. You can upload this file to a support case on the link:https://access.redhat.com/[Red Hat Customer Portal].
* To collect data for the past 24 hours, run the following command:
+
[source,terminal]
----
$ oc adm must-gather --image=registry.redhat.io/rhmtc/openshift-migration-must-gather-rhel8:v1.8 -- /usr/bin/gather_metrics_dump
----
+
This operation can take a long time. This command saves the data as the `must-gather/metrics/prom_data.tar.gz` file.
endif::[]