The generate_postmortem.sh
script gathers all logs for troubleshooting
and diagnostics.
About this task
When contacting IBM Support, several logs are required to assist in troubleshooting or
diagnostics. The generate_postmortem.sh
script gathers all the required logs using
a single shell script.
Note: This article refers to third-party software and documentation that IBM does not control. As
such, the software may change and this information may become outdated.
Procedure
- Install the
kubectl
command line interface for Kubernetes, if it is not
already installed.
-
Configure
kubectl
to the Kubernetes cluster by entering the following
commands:
rm -fr $HOME/.kube
mkdir -p $HOME/.kube
scp root@{kubernetes_master_host}:/etc/kubernetes/admin.conf $HOME/.kube/config
-
Download the
generate_postmortem.sh
script. It will be downloaded to the
apicup project directory. Enter the following command:
curl -s -o generate_postmortem.sh https://raw.githubusercontent.com/ibm-apiconnect/v10-postmortem/master/generate_postmortem.sh
-
Add execute permissions to the
generate_postmortem.sh
script. Enter the
following command:
chmod +x generate_postmortem.sh
-
Run the postmortem tool using the following command:
- (Optional) Currently, log generation is supported for Gateway and Portal subsystems.
Specify either gateway or portal, or all subsystems. Enter the following arguments:
All (generates logs for both Portal and Gateway subsystems): ./generate_postmortem.sh --diagnostic-all
Gateway: ./generate_postmortem.sh --diagnostic-gateway
Portal: ./generate_postmortem.sh --diagnostic-portal
- (Optional) If there are errors when running the
generate_postmortem.sh
script, enter the following command: