Gathering logs
How to gather the API Connect system logs and configuration information for use in troubleshooting and diagnostics.
When you open a support case for API Connect, system logs and environment data are normally required to help diagnosis. Several tools are used for gathering this data:
- The apic-mustgather tool collects all the logs and system information from the API Connect deployment.
- The apicops tool gathers extra debug information about the synchronization of the management subsystem with the gateway and portal services.
Installing the apic-mustgather tool
Download the latest version of the apic-mustgather tool.
- To download apic-mustgather tool, run the following
command:
curl -L -O https://github.com/ibm-apiconnect/v10-postmortem/releases/latest/download/apic-mustgather
The apic-mustgather tool gathers the logs of the currently running processes. The logs have a maximum size and older log messages are not retained when the maximum size is reached. To ensure that the logs gathered cover the time when the problem occurred, reproduce the problem and then gather the logs without delay. Offboarding the logs to an external server is the best practice for long-term storage of log data.
Running the apic-mustgather tool
- Copy the apic-mustgather tool to your API Connect container
environment and give it execute permissions:
chmod +x apic-mustgather
If your API Connect deployment has subsystems in different environments, then copy apic-mustgather to each environment.
- Re-create the problem that you want to diagnose.
- Run the apic-mustgather
tool:
./apic-mustgather
The apic-mustgather tool gathers logs and status information for all API Connect resources and all related Kubernetes or OpenShift resources that it can find. The files are compressed to /tmp/apic-mustgather-*.tar.gz.
If your API Connect deployment has subsystems in different environments, then run apic-mustgather in each environment.
Note: The apic-mustgather checks if the apicops tool is present and if not then it attempts to download it. If you do not have the apicops tool locally and your environment does not have internet access to download it, then before you run apic-mustgather do the following:- Download apicops.
- Give apicops execute
permissions:
chmod a+x apicops
- Copy apicops to the same location as apic-mustgather.
- Upload the following to the support case:
- /tmp/apic-mustgather-*.tar.gz
- The steps to reproduce the problem (if applicable).
- The time the problem occurred.
- Screen capture of error (if applicable).