mirror of
https://github.com/openshift/openshift-docs.git
synced 2026-02-07 00:48:01 +01:00
100 lines
3.8 KiB
Plaintext
100 lines
3.8 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
|
|
// * backup_and_restore/application_backup_and_restore/troubleshooting.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.
|
|
|
|
ifdef::troubleshooting-3-4,troubleshooting-mtc[]
|
|
You can collect data for a one-hour or a 24-hour period and view the data with the Prometheus console.
|
|
endif::[]
|
|
ifdef::oadp-troubleshooting[]
|
|
You can run the `must-gather` tool with the following data collection options:
|
|
|
|
* Full `must-gather` data collection collects Prometheus metrics, pod logs, and Velero CR information for all namespaces where the OADP Operator is installed.
|
|
* Essential `must-gather` data collection collects pod logs and Velero CR information for a specific duration of time, for example, one hour or 24 hours. Prometheus metrics and duplicate logs are not included.
|
|
* `must-gather` data collection with timeout. Data collection can take a long time if there are many failed `Backup` CRs. You can improve performance by setting a timeout value.
|
|
* Prometheus metrics data dump downloads an archive file containing the metrics data collected by Prometheus.
|
|
endif::[]
|
|
|
|
.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.
|
|
* You must use {op-system-base-full} 8.x with OADP 1.2.
|
|
* You must use {op-system-base-full} {op-system-version} with OADP 1.3.
|
|
|
|
.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,troubleshooting-mtc[]
|
|
* To collect data for the past hour:
|
|
endif::[]
|
|
ifdef::oadp-troubleshooting[]
|
|
* Full `must-gather` data collection, including Prometheus metrics:
|
|
endif::[]
|
|
.. For OADP 1.2, use the following command:
|
|
+
|
|
[source,terminal]
|
|
----
|
|
oc adm must-gather --image=registry.redhat.io/oadp/oadp-mustgather-rhel8:v1.2
|
|
----
|
|
+
|
|
.. For OADP 1.3, use the following command:
|
|
+
|
|
[source,terminal]
|
|
----
|
|
oc adm must-gather --image=registry.redhat.io/oadp/oadp-mustgather-rhel9:v1.3
|
|
----
|
|
+
|
|
The data is saved as `must-gather/must-gather.tar.gz`. You can upload this file to a support case on the link:https://access.redhat.com/[Red Hat Customer Portal].
|
|
|
|
ifdef::oadp-troubleshooting[]
|
|
* Essential `must-gather` data collection, without Prometheus metrics, for a specific time duration:
|
|
+
|
|
[source,terminal,subs="attributes+"]
|
|
----
|
|
$ oc adm must-gather --image={must-gather} \
|
|
-- /usr/bin/gather_<time>_essential <1>
|
|
----
|
|
<1> Specify the time in hours. Allowed values are `1h`, `6h`, `24h`, `72h`, or `all`, for example, `gather_1h_essential` or `gather_all_essential`.
|
|
|
|
* `must-gather` data collection with timeout:
|
|
+
|
|
[source,terminal,subs="attributes+"]
|
|
----
|
|
$ oc adm must-gather --image={must-gather} \
|
|
-- /usr/bin/gather_with_timeout <timeout> <1>
|
|
----
|
|
<1> Specify a timeout value in seconds.
|
|
endif::[]
|
|
ifdef::troubleshooting-3-4,troubleshooting-mtc[]
|
|
* To collect data for the past 24 hours:
|
|
endif::[]
|
|
ifdef::oadp-troubleshooting[]
|
|
* Prometheus metrics data dump:
|
|
endif::[]
|
|
.. For OADP 1.2, use the following command:
|
|
+
|
|
[source,terminal]
|
|
----
|
|
oc adm must-gather --image=registry.redhat.io/oadp/oadp-mustgather-rhel8:v1.2 -- /usr/bin/gather_metrics_dump
|
|
----
|
|
.. For OADP 1.3, use the following command:
|
|
+
|
|
[source,terminal]
|
|
----
|
|
oc adm must-gather --image=registry.redhat.io/oadp/oadp-mustgather-rhel9:v1.3 -- /usr/bin/gather_metrics_dump
|
|
----
|
|
This operation can take a long time. The data is saved as `must-gather/metrics/prom_data.tar.gz`.
|
|
|