Skip to content

GCP VPC

Ian edited this page Jan 29, 2022 · 1 revision

Steps to export GCP flow to NR via ktranslate:

  • Create a vpc log for your project
  • Create a pub/sub pull endpoint for this log
  • Create a subscription for this log
  • Tell ktranslate to listen on the subscription:
docker run -ti --rm kentik/ktranslate:v2 \
  -e NEW_RELIC_API_KEY=$NR_INSIGHTS_INSERT_KEY  \
  -vpc gcp \
  -gcp.project $PROJECT_NAME \
  -gcp.sub $SUBSCRIPTION_NAME \
  -nr_account_id=$NR_ACCOUNT_ID \
  --tee_logs \
  -metrics=jchf \
  nr1.vpc 

This runs as a container, you can have as many instances are you like listening to the subscription.