How to troubleshoot the VMware Tanzu for Microsoft Azure Log Analytics
search cancel

How to troubleshoot the VMware Tanzu for Microsoft Azure Log Analytics

book

Article ID: 386647

calendar_today

Updated On:

Products

Operations Manager

Issue/Introduction

The Azure Log Analytics Nozzle Tile is tricky to troubleshoot because it deploys an app to perform its function.
The errand also deploys and deletes a VM very quickly, preventing the admin to ssh onto the VM for troubleshooting purposes.

We can use the power of the Bosh Director to prevent the VM deletion during the errand and troubleshoot any issue related to the Tile.

Environment

 

Resolution

Prevent the Errand VM Deletion

Step 1: SSH into the BOSH Director VM

To stop the VM deletion, first SSH into the BOSH Director VM.

 

Step 2: Trigger the Azure Log Analytics Nozzle Errand

Open a new terminal with access to the BOSH CLI and run the following command to trigger the Azure Log Analytics Nozzle errand:

bosh -d azure-log-analytics-nozzle run-errand deploy-all

 

Step 3: Restart the Director Processes

While the Azure Log Analytics Nozzle errand is running:

  1. Wait for the VM creation process to begin.

  2. Before the VM is fully created, execute the following command on the BOSH Director VM:
    sudo monit restart all

    This causes the errand to fail.

     

Once the Director processes are back up and running, use the following command to recreate the deploy-all VM into a running state:

bosh -d azure-log-analytics-nozzle recreate


Run the Errand Manually

To run the Azure Log Analytics Nozzle errand manually:

  1. SSH into the deploy-all VM:

    bosh -d azure-log-analytics-nozzle ssh
  2. Execute the following command from the deploy-all VM to run the errand manually:

    sudo /var/vcap/jobs/deploy-all/bin/run

 

Manually Deploy the Azure Log Analytics Nozzle App

You can manually deploy the Azure Log Analytics Nozzle application by setting up the CF CLI credentials inside the deploy-all VM and redeploying the application.

Location of Configuration and Executable Files

  • Manifest file locations:

    • /var/vcap/jobs/deploy-all/config/manifest.yml
    • /var/vcap/packages/azure_log_analytics_nozzle/manifest.yml
  • CF CLI executables:

    • /var/vcap/packages/cf-cli-8-linux/bin/cf
    • /var/vcap/packages/cf-cli-6-linux/bin/cf


Note:

Depending on the version of the tile, the CF CLI credentials can be found in one of the following files:

  • /var/vcap/jobs/deploy-all/bin/run
  • /var/vcap/jobs/deploy-all/lib/common.sh


Set the CF CLI Credentials

Run the following commands to configure the CF CLI and target the appropriate environment:

  • /var/vcap/jobs/deploy-all/bin//var/vcap/packages/cf-cli-6-linux/bin/cf api https://api.tanzu-lab.broadcom.net --skip-ssl-validation
  • /var/vcap/packages/cf-cli-6-linux/bin/cf auth system_services Pa$$w0rd
  • /var/vcap/packages/cf-cli-6-linux/bin/cf target -o system >/dev/null
  • /var/vcap/packages/cf-cli-6-linux/bin/cf target -s azure-log-analytics-nozzle-space >/dev/null


Deploy the Application

Finally, deploy the application using the following command:

/var/vcap/packages/cf-cli-6-linux/bin/cf push azure-log-analytics-nozzle-4.0.8 -f /var/vcap/packages/azure_log_analytics_nozzle/manifest.yml