Skip to main content
Google Cloud Platform provides sinks, which control how you can route log data to supported destinations. Use the Google Cloud Pub/Sub destination to route log data from Google Cloud Platform to Chronosphere Observability Platform. Complete the following steps to route logs from Google Cloud Platform:
  1. Create a sink for logs.
  2. Create a service account.
  3. Create a pull subscription.
  4. Contact Chronosphere Support.
If you want to use Terraform to manage routing Google logs to Observability Platform, refer to the Terraform example. After applying this configuration, Terraform generates the information that you supply to Chronosphere Support.
This integration is only intended to handle throughput with low volume. To determine whether this integration is suited to your use case, contact Chronosphere Support.
If you want to route metrics data from Google Cloud Platform, see Ingest Google Cloud metrics.

Create a sink for logs

First, you need to create a sink that defines the service type and destination to route your logs.
  1. In the Google Cloud Logs Console, in the left navigation, click Log Router to open the Log router page.
  2. Follow the steps in the Google Cloud documentation to create a sink.
  3. Select Cloud Pub/Sub topic as the sink service.
  4. Optional: Enter a filter expression that matches the log entries you want to include. See the Logging query language in the Google Cloud documentation for information about how to construct queries.
  5. Complete the remaining steps to create the sink.
Next, create a service account.

Create a service account

After creating a sink, you create a service account in Google Cloud that Observability Platform impersonates. Before starting this process, obtain the Observability Platform principal for Google Cloud. Click your profile icon from the menu bar and select My Account. Copy the value next to Google Cloud Logs IAM Principal. Each Google Cloud service account must grant access to the Observability Platform principal to impersonate them.
  1. In the Google Cloud console, create a service account.
    The service account must have read access to route log data to Observability Platform.
  2. Add the Observability Platform principal you obtained previously to the Google Cloud service account.
  3. Grant the principal the iam.serviceAccountTokenCreator role.
  4. Enter information for the remaining fields to finish creating the service account.
Next, create a pull subscription.

Create a pull subscription

Add a pull subscription to the Pub/Sub destination you previously created. Observability Platform initiates requests to the Pub/Sub server to retrieve messages.
  1. In the Google Cloud console, Create a pull subscription.
  2. In the Delivery type menu, select Pull.
  3. Configure the following recommended settings:
*Set Message retention duration to less than 24 hours to avoid storage costs.
  1. Grant access to the Pub/Sub you created by assigning the following roles to your new internal service account:
    • roles/pubsub.subscriber
    • roles/pubsub.viewer
Lastly, contact Chronosphere and provide the details about your pull subscription.

Contact Chronosphere Support

After completing the previous steps, contact Chronosphere Support and provide the following information:
  • The name of your new Google Cloud service account email, such as:
    • SERVICE-ACCOUNT is the name of the Google Cloud service account you created in create a service account.
    • PROJECT-ID is the ID of your Google Cloud project.
  • The name of the logging sink subscription you created, such as
Chronosphere can then enable the logging integration to start routing your Google Cloud logs to Observability Platform.

Terraform example

The following code provides an example for creating a single Google Cloud service account in the a Google Cloud project, and enables Observability Platform to impersonate and gain access.