Google Cloud Operations
Ship logs from Google Operations Platform to Logstash
Follow the steps below to send your observability data to Logit.io
Logs
Install Integration
Export Logs to Google Pub/Sub
Ensure that you have Cloud Operations logs configured in GCP (opens in a new tab).
Now we can filter the logs as needed, by clicking on the service name and choosing Show matching entries as shown below.
Read more about how to configure and export logs using the Google Operations Console (opens in a new tab)
Create A Sink
To export the logs choose Create sink as shown below.
You will be then be prompted for:
- Sink details (enter a name)
- Sink destination (choose Cloud Pub/Sub topic creating a new topic if needed)
- Choose logs to include in sink (this will have a filter applied already if you filtered the logs above)
Choose Create sink to continue.
Create Google Pub/Sub
Locate your newly created Pub/Sub topic (opens in a new tab) and choose Create subscription.
Enter a suitable Subscription ID and leave the delivery type as pull.
We don't need to change anything further at this stage, scroll to the bottom and choose CREATE to create the Subscription.
Create Service Account
Now in service accounts (opens in a new tab), choose the project you're working with.
Then select CREATE SERVICE ACCOUNT, this account will be used to retrieve logs from the Pub/Sub and send them to Logit.io.
Name the service account and in step 2 add the role Pub/Sub Subscriber as shown below, then choose DONE.
Now choose Manage keys as shown below.
Then choose ADD KEY > Create new key, choosing the recommended JSON format. This will download the JSON key to your machine ready to use in the next step.
Configuring Logstash
To start pulling logs and metrics from the Google Cloud Platform to your Stack you need to configure a Google Cloud Platform Input on your Logit.io Stack.
Go to DashboardLogit.io will verify your input before it is applied, we will contact you to confirm when this has been completed.
Launch Logit.io to view your logs
Data should now have been sent to your Stack.
View My DataIf you don't see take a look at How to diagnose no data in Stack below for how to diagnose common issues.
Cloud Operations Logging Overview
Sending and analyzing logs and metrics efficiently is crucial for maintaining the health and performance of your applications and services on the Google Cloud Platform (GCP). One powerful option for log management and analysis is integrating your GCP environment with Logit.io.
Logit.io provides a seamless way to collect, centralize, and gain insights from your logs and metrics. To get started with sending data to Logit.io from GCP, you can utilize various methods and tools, including Logstash, Fluentd, or even direct integration with popular GCP services like Cloud Logging. Learn more about setting up this essential connection by exploring our guide on sending GCP logs to Logit.io. However, before you embark on this journey of log management, it's essential to ensure that your GCP infrastructure is optimized for performance and reliability. Google Cloud Load Balancing plays a pivotal role in distributing incoming traffic and ensuring high availability for your applications. Additionally, efficient data storage is key when dealing with logs and metrics. Google Cloud Storage provides a secure and scalable solution for storing your log data for long-term analysis.
Logit.io's GCP logging (opens in a new tab) incorporates integrations that function seamlessly.