NSX Intelligence Log Bundle Does Not Contain Recommendation Spark Job Log
search cancel

NSX Intelligence Log Bundle Does Not Contain Recommendation Spark Job Log

book

Article ID: 316669

calendar_today

Updated On:

Products

VMware NSX

Issue/Introduction

Provide a process to gather the Spark Job log from NSX Intelligence in 3.2.0.

Symptoms:
By default in NSX Intelligence 3.2.0, the Recommendation Spark Job log is not collected as part of a support log bundle. 

The Recommendation Spark Job log, while not collected by default in the support log bundle, may be required for VMware analysis.

Environment

VMware NSX-T Data Center 3.x
VMware NSX-T Data Center

Cause

When NAPP support bundle request is called, a substring search of the entries under components in servicemap.yaml file is run against the log filenames. If the substring of the file name matches the prefix or name under the component, the log will be picked and added to the NAPP support bundle.

The Recommendation Spark Job component is not included in servicemap.yaml file, thus the substring search will not include the Recommendation Spark Job logs in the NAPP support bundle. 

Resolution

The Recommendation Spark Job component will be added in servicemap.yaml in future releases of NSX Intelligence to automate the log's inclusion in an NAPP support bundle.

Workaround:

To gather the Recommendation Spark Job log, please reference the steps below: 
 

1. SSH into the nsx manager. Enter the password and press enter.

ssh root@<nsx-manager> 

 

 

2. Go to root location

cd ~

 

 

3. Create a .sh script file and enter insert mode

vim collect.sh

Press " i " once in vim to insert text. 

 

4. Copy and paste the following command, it will copy all the recommendation spark job driver logs and recommendation spark job executor logs into logs directory under root.

#!/bin/sh
 
alias gc='kubectl --kubeconfig /config/vmware/napps/.kube/config -n nsxi-platform'
 
rm -rf logs
 
mkdir logs
 
for file in $(gc exec -it fluentd-0 -- /bin/bash -c "find opt/bitnami/fluentd/logs/buffers -name \"rec-*.log\"")
 
do
 
  file1=`echo $file | sed 's/\\r//g'`;
 
  echo "Copying file $file1";
 
  file2=`echo $file1| rev | cut -d'/' -f 1 | rev`;
 
  gc cp fluentd-0:$file1 ~/logs/$file2;
 
done

 

 

 

5. Save and exit the .sh file

press ESC key.

type in  " :wq! "

 

 

6. Run the collect.sh file, wait until the script is done.

sh collect.sh

 

 

7. Exit the nsx-manager

exit

 

 

8. Copy the logs directory to local. On your local run command below and enter the nsx-manager password.

scp -r root@<nsx-manager ip>:~/logs <location you want to store on your local>

 

 

9. Upload the log folder to the VMware Support Request for VMware analysis. 


Additional Information

Impact/Risks:
The Recommendation Spark Job logs may be required for VMware analysis of NSX Intelligence 3.2.0.