GCP Logs
Google Cloud Platform offers integrated monitoring and observability tools that enable users to gather and analyze logs from their GCP resources. Send these GCP logs to Coralogix to search, analyze, and visualize your data. Gain insights into application behavior, identify errors, and troubleshoot problems effectively.
Overview
Google Cloud Platform (GCP) logs encompass all types of log entries generated across various Google Cloud Platform services and resources. These logs capture a wide range of information, including activities, events, and system operations related to your entire GCP environment. This can include logs from compute instances, databases, networking, security, access, and more.
The integration collects logs that are published to a GCP Pub/Sub topic to which one has a subscription, referenced by a subscription name.
Benefits
By integrating Coralogix seamlessly with your GCP environment, you can gain a comprehensive understanding of your system’s performance, user experiences, and security. This enables you to proactively detect issues, troubleshoot effectively, and optimize your resources, ultimately improving the reliability and efficiency of your applications.
Prerequisites
To begin, you must have an existing project within your Google Workspace.
Route GCP logs to the Pub/Sub topic
STEP 1. Log in to the GCP console.
STEP 2. Go to Pub/Sub
/ Topics
and create a Topic. Uncheck the ‘Add a default subscription’ checkbox.
STEP 3. Go to Logging
/ Logs Router
and create a Sink.
Select sink service: Cloud Pub/Sub topic
Select the Cloud Pub/Sub topic created in the previous step
Choose logs to include in Sink: Leave blank. Do not denote logs that should be included or excluded.
Create a pull subscription
Use "Google Cloud Pub/Sub Topic created in STEP 2 [above] within your Google Cloud project. The following property settings are mandatory:
Delivery type: Pull
Exactly once delivery: Disabled
All other property settings below are recommended but not mandatory.
Setup
1. Configure a Service Account and API Key to facilitate automated intermediation.
2. From your Coralogix toolbar, navigate to Data Flow > Integrations.
3. From the Integrations section, select GCP Logs.
4. Click + ADD NEW.
5. If you haven’t already done so, click GO TO GCP ACCOUNT and create a key file. Then, click NEXT.
6. Click SELECT FILE and upload the key file you previously created.
7. A confirmation will appear when the file is uploaded successfully. Click NEXT.
8. Fill in the settings:
Integration Name: Name your integration. This field is automatically populated, but can be changed if you want.
Specific configuration for version 0.0.1
- Application Name: Naming conventions for production, development and/or staging environments.
- Subsystem Name: Naming conventions for production, development and/or staging environments.
Specific configuration for version 0.1.0 and later
- Application Name templates: Templates from which the application name is derived.
Subsystem Name templates: Templates from which the subsystem name is derived.
Working with templatesTemplate syntax, e.g.
${variable}
, supports the following variables:projectId
organizationId
billingAccountId
folderId
logId
resourceType
Most of the variable values are extracted from thelogName
field of the LogEntry. The only outlier isresourceType
, which is taken from theresource.type
field of the log entry. The first template with all variables existing will be used.
ExampleApplication/Subsystem Name configuration using templates: [
gcp/${projectId}
,gcp/prod
]The resulting value will be:
gcp/my-project-123
for a log entry withlogName
set toprojects/my-project-123/logs/my-log
gcp/prod
for a log entry withlogName
set toorganization/my-org-123/logs/my-log
Note
Both Application Name and Subsystem Name must contain a constant value for fallback in case of a missing field.
Subscription Name: This is the subscription name you previously created in Prerequisites.
9. Click COMPLETE and finish the setup.
Please wait a few minutes before the integration takes effect and your data is available on the platform.
Support
Need help?
Our world-class customer success team is available 24/7 to walk you through your setup and answer any questions that may come up.
Feel free to reach out to us via our in-app chat or by sending us an email to [email protected].