must-gather
is a tool built on top of OpenShift must-gather
that expands its capabilities to gather Forklift specific resources
oc adm must-gather --image=quay.io/konveyor/forklift-must-gather:latest
The command above will create a local directory with a dump of the Forklift state.
You will get a dump of Forklift-related:
- logs
- CRs
- metrics (optional)
To reduce amount of data and time consumed by must-gather, there is a "targeted" version which allows dump only selected resources.
It is possible specify namespace (NS), plan (PLAN) or virtual machine ID (VM).
oc adm must-gather --image=quay.io/konveyor/forklift-must-gather:latest -- NS=ns1 PLAN=plan1 VM=vm-3345 /usr/bin/targeted
Get Prometheus metrics data directory dump (last day, might take a while):
oc adm must-gather --image quay.io/konveyor/forklift-must-gather:latest -- /usr/bin/gather_metrics_dump
Run local Prometheus instance with dumped data:
make prometheus-run # and prometheus-cleanup when you're done
The latest Prometheus data file (prom_data.tar.gz) in current directory/subdirectories is searched by default. Could be specified in PROMETHEUS_DUMP_PATH
environment variable.
You can build the image locally using the Dockerfile included.
A Makefile
is also provided. To use it, you must pass a repository via the command-line using the variable IMAGE_NAME
.
You can also specify the registry using the variable IMAGE_REGISTRY
(default is quay.io) and the tag via IMAGE_TAG
(default is latest
).
The targets for make
are as follows:
build
: builds the image with the supplied name and pushes itdocker-build
: builds the image but does not push itdocker-push
: pushes an already-built image
For example:
make build IMAGE_NAME=my-repo/forklift-must-gather
would build the local repository as quay.io/my-repo/forklift-must-gather:latest
and then push it.