How to collect logs from BOSH Director
search cancel

How to collect logs from BOSH Director

book

Article ID: 293596

calendar_today

Updated On:

Products

Operations Manager

Issue/Introduction

This article describes how to collect BOSH Director logs. These logs are helpful to troubleshoot BOSH Tasks internal workflow.
NOTE: Please check this KB if you want to collect additional logs for OpsManager, Bosh director and Bosh VM managed how to collect the logs for OpsManager Bosh director and system logs for Bosh VM managed

Environment


Cause

BOSH Tasks are failing or timing out and we don't understand what stage they are failing. BOSH Director logs help us to understand the internal workflow of the Director starting from accepting the logs, tasks committed to the database and finally picked up by one of the 5 (default) Director workers.

Resolution

The Director logs can be collected from a machine that has SSH access to the PCF foundation, precisely to the Director VM.
In this procedure below, I have taken an example where the local machine has direct access to Director VM.

Login to Ops Manager GUI as admin user and collect the below details from Director tile:

  • Director IP Address: From the Status tab
  • vcap user Password: From the Credentials tab

Login to BOSH Director VM:

  1. ~$ ssh vcap@{bosh_director_ip}
  2. >{vcap_password}

Create a tar of the log directory and change the owner to vcap user:

  1. ~$ sudo -i
  2. ~$ tar zcvhf /home/vcap/bosh_logs.tgz /var/vcap/sys/log
  3. ~$ chown vcap:vcap /home/vcap/bosh_logs.tgz

Copy the bosh_logs to the local machine (or the machine that was used to SSH to the Director):

  • ~$ scp vcap@{bosh_director_ip}:"/home/vcap/bosh_logs.tgz" .
  • Enter the password for vcap user to copy the bosh_logs to the local directory (.). Create and change to a new directory, if needed on the local machine.