Executing the NF Deployment Data Collector Module

Perform this procedure to start the NF Deployment Data Collector module and generate the tarballs. If the user does not specify the output storage path, then this module generates the output in the same directory where the module is executed.
  • Ensure that you must have appropriate privileges to access the system and execute kubectl and helm commands.
  • Prepare CNC NF Data Collector as described in Downloading and Preparing CNC NF Data Collector.
  • Perform this procedure on the same machine where the NF is deployed using helm or kubectl.
  1. Optional: Untar ocnf-data-exporter-1.1.0.tgz.
    The NF Deployment Data Collector module is extracted to the ocnf-data-exporter directory at ocnf-data-exporter/nf-tools/dataCollector. This directory also contains ReadMe.txt.
  2. Execute the following command to start the module:

    Users with privileges to execute kubectl and helm commands can run this module. In case, the context file is available with required privileges, then it can be used using Example 1.

    ./nfDataCapture.sh -n|--k8Namespace=[K8 Namespace] -k|--kubectl=[KUBE_SCRIPT_NAME] -h|--helm=[HELM_SCRIPT_NAME]  -s|--size=[SIZE_OF_EACH_TARBALL] -o|--toolOutputPath
    Where,
    • <K8 Namespace> indicates Kubernetes Namespace in which NF is deployed.
    • <KUBE_SCRIPT_NAME> indicates the kube script name.
    • <HELM_SCRIPT_NAME> indicates the helm script name.
    • <SIZE_OF_EACH_TARBALL> indicates the size of each tarball.
    This module generates tarballs that starts with <K8Namespace>debugData, which contains all the logs required for debugging, and then divides the same tar into several tarballs based on the size specified in the command. For more information, refer to Example 1 and Example 2. By default the size of each tarball is set to 10 megabytes if no size is specified in the command. For more information, refer to Example 3.
    Examples of the command:
    • Example 1:
      ./nfDataCapture.sh -k ="kubectl --kubeconfig=admin.conf" -h ="helm --kubeconfig admin.conf" -n=ocnrf -s=5M -o=/tmp/
    • Example 2:
      ./nfDataCapture.sh -n=ocnrf -s=5M -o=/tmp/
    • Example 3:
      ./nfDataCapture.sh -n=ocnrf

    Note:

    The default size of the generated tarball is 10 MB. The default location of the output is tool working directory if the location is no specified.
    Sample output
    Data collection work completed. Packing data collected ....
    Data collected to:- ./ocnrf.debugData.2020.07.02_09.27.19.tar.gz
  3. After transferring the tarballs to the required destination, combine the tarballs into a single tarball by executing the following command:

    Note:

    If the size of the generated tar, for example, ocnrf.debugData.2020.06.08_12.02.39.tar.gz, is greater than the size specified in the command, then the tar is split into several tarballs based on the size specified in <SIZE_OF_EACH_TARBALL>.
    cat <splitted files*>  <combinedTarBall>.tar.gz
    Example:
    cat ocscp.debugData.2020.09.14_18.12.49-part* > ocscp.debugData.2020.09.14_18.12.49-combined.tar.gz