Get a DemoStart Free TrialSign In

Google Cloud Load Balancing

Ship Google Cloud platform load balancing logs from Pub/Sub to Logstash

Send Your DataLogsGoogle CloudGoogle Cloud Load Balancing Guide

Follow this step by step guide to get 'logs' from your system to Logit.io:

Step 1 - Confirm Google Cloud Load Balancing Logs

If you already have logging enabled for your Google Cloud load balancing you can skip to step 2. Instructions on how to configure Google Cloud load balancing can be found here.

Google Cloud provides a basic log viewer, in order to get the logs into your Stack we need to configure a Pub/Sub sink, from where Logstash can collect the logs.

Step 2 - Export Logs to Google Pub/Sub

Having located the logs you wish to export, choose the option to CREATE SINK. You will be prompted with the following options. Choose the Cloud PubSub topic option.

Select sink service

You will be then be prompted for:

  • Sink name
  • Sink Service (choose Pub/Sub)
  • Sink Destination (choose create new Cloud Pub/Sub topic)

Fill in edit sink form

Create new Cloud Pub/Sub topic

Once you've entered these details choose create sink. This will ensure that the logs you have specified are directed to the Pub/Sub sink

Step 3 - Create Google Pub/Sub

Locate your newly created Pub/Sub topic.

Find topic in Topics menu

On your topic, click the ellipsis to the right.

Go to topic settings

Enter a suitable subscription ID and make sure delivery type is set to pull.

Scroll to the bottom of the page and press create.

Create subscription for topic

Step 4 - Create Service Account

Visit service accounts and choose the project you want to add the service account to. This will be used to retrieve logs from the GooglePubSub and send to Logstash.

Service accounts screenshot

Select create a new service account.

Create new service account

Give your service account a name and add the relevant Pub/Sub permissions for the service account.

Configure new service account

Now we need to create a key for the service account, this will be used by Logstash to access the service account in order to retrieve logs.

Click into the newly created service account.

View new service account

Choose the option to add a key and then select create a key option, remember to download the service key as json when prompted.

Add key using dropdown

Step 5 - Configuring Logstash

To start pulling Logs from the Google Cloud Platform pub/sub to your Stack a Logit.io engineer will configure the Logstash input for you. You can share the following details with our engineers securely over intercom using the button below.

project_id => The complete ID of your project
topic => The name of the topic you created
subscription => The name of the subscription you created
json_key_file => The json key file for your service account.

request input

Step 6 - Check Logit.io for your logs

Now you should view your data:

View my data

If you don't see logs take a look at How to diagnose no data in Stack below for how to diagnose common issues.

Step 7 - Cloud Loadbalancing Logging Overview

Google Cloud Load Balancing is a service that enables you to distribute incoming traffic across multiple instances or regions in your Google Cloud environment. It offers several types of load balancers, including HTTP/HTTPS, SSL Proxy, TCP Proxy, and Network Load Balancing.

Logging in Google Cloud Load Balancing refers to the process of collecting and analyzing log data related to the traffic that passes through the load balancer. This can include information such as the source and destination IP addresses, request and response times, HTTP response codes, and other metadata.

Google Cloud Load Balancing provides several logging options, including:

Stackdriver Logging: This is the default logging option for Google Cloud Load Balancing. It enables you to collect, view, and analyze logs in real-time using the Stackdriver Logging UI or API. You can use Stackdriver Logging to monitor and troubleshoot issues with your load balancer, and to set up alerts based on specific log events.

Cloud Storage Logging: This option allows you to export your logs to Google Cloud Storage, where you can store them for long-term retention or analysis. You can use Cloud Storage Logging to meet compliance requirements, perform forensic analysis, or store logs for archival purposes.

Pub/Sub Logging: This option enables you to export your logs to Google Cloud Pub/Sub, which is a messaging service that enables you to stream data between different services and applications. You can use Pub/Sub Logging to perform real-time analysis of your log data or integrate it with other services in your Google Cloud environment.

Overall, logging in Google Cloud Load Balancing provides visibility into the traffic that passes through your load balancer, which can help you identify and troubleshoot issues in real-time. It also enables you to store and analyze your log data for long-term retention or analysis, which can be useful for compliance purposes or forensic analysis.

If you need any assistance with analysing your Google Cloud Compute logs we're here to help. Feel free to reach out by getting in contact with us via live chat & we'll be happy to help you start analysing your Cloud Compute data.

Return to Search
Sign Up

© 2023 Logit.io Ltd, All rights reserved.