How to enable debugging in Carbon Black Sensor Gateway
search cancel

How to enable debugging in Carbon Black Sensor Gateway

book

Article ID: 380295

calendar_today

Updated On:

Products

Carbon Black Cloud Endpoint Standard Carbon Black Cloud Workload

Issue/Introduction

This article is explaining how to enable debug or trace level of envoy component in Carbon Black Sensor Gateway.

Enable this in case if technical support will ask to enable it.

Environment

CB Sensor Gateway 1.2.x

Resolution

Run below commands if you were asked to enable either debug or trace level of envoy component in sensor gateway

  1. Escalate to root and list docker container details
    admin@photon-machine [ ~ ]$ su
    Password: <INSERT HERE THE CB Sensor Gateway ROOT PASSWORD>
    root@photon-machine [ /home/admin ]# docker ps
    CONTAINER ID   IMAGE                                                                            COMMAND                  CREATED        STATUS                  PORTS                                                                      NAMES
    b3a100759606 sensor-gateway.packages.broadcom.com/sensor_gateway/linux/sensor-gateway:1.2.1   "/usr/bin/supervisor…"   10 hours ago   Up 10 hours (healthy)   0.0.0.0:80->80/tcp, :::80->80/tcp, 0.0.0.0:443->443/tcp, :::443->443/tcp   sensor-gateway
  2. Login to the docker container b3a100759606 (Container ID) Note that this value is unique for each container, and it should be different always, hence make sure you copy the container ID value to put it in below command
    root@photon-machine [ /home/admin ]# docker exec -u root -it b3a100759606 /bin/bash
  3. To enabled debug logging level
    root [ ~ ]#  curl --location --request POST 'http://localhost:9901/logging?level=debug' -v

    To Enable trace logging level
    root [ ~ ]#  curl --location --request POST 'http://localhost:9901/logging?level=trace' -v

  4. Once the issue is reproduced, copy all the logs from under /opt/vmware/sgw/data/logs
  5. Disable the debugs once done reproducing the issue
    root [ ~ ]#  curl --location --request POST 'http://localhost:9901/logging?level=info' -v