How to Find Log-Store Partition for a Given App in App Metrics
search cancel

How to Find Log-Store Partition for a Given App in App Metrics

book

Article ID: 424270

calendar_today

Updated On:

Products

VMware Tanzu Application Service

Issue/Introduction

The node-locator tool relies on environment variables that are only present inside the log-store execution shell environment. If run outside of it, required variables like LOG_STORE_INSTANCES, PARTITION_COUNT, etc. will be missing:

Failed to load config from environment: missing required environment variables: LOG_STORE_INSTANCES, LOG_STORE_LOCAL_ADDR, PARTITION_COUNT, REPLICATION_FACTOR

Environment

App Metrics

Resolution

Step 1 — SSH into a log-store VM

 
bosh -d <deployment> ssh <log-store-vm> 

Step 2 — Enter the log-store execution shell environment

 
cd /var/vcap/packages/bpm/bin/
./bpm shell log-store

Step 3 — Find the SOURCE_ID

SOURCE_ID is the app GUID. You can retrieve it from cf:

 
cf app <app-name> --guid

Step 4 — Run node-locator shows placement

You need provide SOURCE_ID as an environment variable

 
SOURCE_ID=<source-guid> /var/vcap/packages/node-locator/node-locator