Troubleshooting mini-snif

Guardium® Insights provides a script to gather troubleshooting information for the mini-snif component for specific types of problems. You can run the script from the cpctl command line, but run it only under the direction of the IBM support team.

Before you begin

Install the cpctl utility as described in Troubleshooting with the cpctl utility.

Procedure

  1. From cpctl, issue the command for mini-snif troubleshooting, as follows:
    ./cpctl tools GI_scripts_minisnif_support --token $(oc whoami -t) --actionable_options '<options>' --namespace <guardium_insights_namespace> --tenant_id <Guardium insights tenant ID>
    Where,
    • The token is the OpenShift® administrative user token.
    • <guardium_insights_namespace> is the Guardium Insights OpenShift namespace that you created when preparing your environment.
    • Guardium insights tenant ID is a string of characters that begin with TNT_, for example, "TNT_HBE67AYACQZPTUJMNY93FJ". To obtain the tenant ID, log in to the Guardium Insights UI as admin user and click the "GI" icon on the upper right of the screen.
    • actionable_options are the options for the script. Work with IBM support to determine which options to use. The actionable options must be enclosed in single quotation marks (for example, '-p on').
    Select one of the following actionable options,
    • -c on number<suffix> - Start core dump collection. number<unit> is a number immediately followed by a unit of time. Specify one of the following units:
      • s - seconds
      • m - minutes
      • h - hours
      • d - days
      • After you run the core dump command, run the following command to check the log file.
        oc cp <cp-serviceability pod>:/etc/ansible/roles/GI/GI_scripts_list/files/coredump_collection.log ./coredump_collection.log
      Note:
    • -c off - Stop core dump collection. End the process that is waiting for a core dump. If the core dump was already created after collection started, the script collects it.

      For example, if you call ./mini_snif_coredump.sh -c on 1m', the utility waits 1 minute before it creates a core dump . After the specified time, the script collects core dumps from all mini-snif pods that have core dumps, along with a snif binary, and saves them to a .tar file.

    • Note: To use the core dump option, be sure that the script is on a host that can ssh as core user into all nodes.
    • -d on <sidecar digest> - Deploys a sidecar digest into the mini-snif pods that belong to the tenant ID.
      Note: Use this option only when you are working directly with IBM support for debugging.
    • -d off - Remove side car.
    • -g - Dump mini-snif core.
    • -m < on | off > - Start or stop collecting message dumps.
    • -p < on | off > - Start or stop collecting slon information.

    After you call an option, it is applied to all mini-snif pods that belong to the tenant ID.

    Note: If ./cpctl tools GI_scripts_minisnif_support is not working at all, download the mini_snif_support.sh script to your local machine as described in Downloading support scripts.
  2. If needed, download the result files from the pod.
    Some of the actionable options produce files that are downloaded to the cp-serviceability pod. For example, for the -p on (slon) and -c on (core dump) options you might see a similar message:
    HOST - localhost. Command accepted.
    tar: Removing leading `/' from member names
    coredump_05022022_220052.tar.gz collected
    
    1. To download the result files, use the following command to find the cp-serviceability pod.
      # oc get pods | grep cp-serviceability
      Which returns the cp-serviceability pod name. For example,
      staging-cp-serviceability-7fcf569458-fl2zb                        1/1     Running             0          22d
    2. Use the following command to download the file name specified by the output:
      oc cp <cp-serviceability pod>:/etc/ansible/roles/GI/GI_scripts_list/files/<file name> ./<local file name>
      For example,
      oc cp staging-cp-serviceability-7fcf569458-fl2zb:/etc/ansible/roles/GI/GI_scripts_list/files/coredump_05022022_220052.tar.gz ./coredump_05022022_220052.tar.gz 
    3. Finally, use the following command to delete the file from cp-serviceability pod.
      oc exec <cp-serviceability pod> rm /etc/ansible/roles/GI/GI_scripts_list/files/<filename>
      For example,
      oc exec staging-cp-serviceability-7fcf569458-fl2zb rm /etc/ansible/roles/GI/GI_scripts_list/files/coredump_05022022_220052.tar.gz