Gathering logs for a VMware environment

The generate_postmortem.sh script gathers all logs for troubleshooting and diagnostics.

Before you begin

You can download the generate_postmortem.sh script directly to the OVA. If the OVA does not have internet access, first download the script to another machine and then transfer it to the OVA.

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.

Procedure

  1. Connect to the target appliance via SSH then switch to the root user with the following commands:
    ssh apicadm@{ova appliance hostname}
    sudo -i
  2. Download the generate_postmortem.sh script. Enter the following command:
    curl -s -o generate_postmortem.sh https://raw.githubusercontent.com/ibm-apiconnect/v10-postmortem/master/generate_postmortem.sh
  3. Add execute permissions to the generate_postmortem.sh script. Enter the following command:
    chmod +x generate_postmortem.sh
  4. Run the postmortem tool using the following command:
    ./generate_postmortem.sh --ova --pull-appliance-logs
  5. (Optional) Currently, log generation is supported for Portal and Management subsystems. Specify either management or portal, or all subsystems. Enter the following arguments:
    Portal: ./generate_postmortem.sh --ova --diagnostic-portal --pull-appliance-logs
    Management: ./generate_postmortem.sh --ova --diagnostic-manager --pull-appliance-logs
    
  6. (Optional) If there are errors when running the generate_postmortem.sh script, enter the following command:
    ./generate_postmortem.sh --ova --debug &>debug.log

    For more documentation on the script, see https://github.com/ibm-apiconnect/v10-postmortem.

    Note: Offboarding the logs to an external server is the recommended best practice for long term storage of log data. See Configuring remote logging for a VMware deployment.