Skip to main content

CollectorsCloud Collectors Administration Guide

Prerequisites to Configure the GCP Pub/Sub Cloud Collector

Before you configure the GCP Pub/Sub Cloud Collector, complete the following prerequisites:

  • Get administrative rights – Ensure that you have administrative access to manage your Google Cloud Platform.

  • Set up a logging sink – Set up a logging sink to export data to Pub/Sub either at the project level or at a folder of the organization level, depending on the data you want to export. For more information, see Routing and storage overview.

  • Obtain a Subscription ID – Set up a subscription for the Pub/Sub topic to which the log data is exported. Note the Subscription ID that you set while creating a subscription in GCP Pub/Sub and subscription. Subscription ID is associated with your Pub/Sub topic. For more information, see Set up Pub/Sub topic and subscriptions in the Google documentation.

  • Obtain a Project ID – Note the Project ID that you set while creating the Google service account. See Create a Service Account and Obtain a Project ID.

  • Assign the required permissions to the service account – Assign the following permissions to the service account to support auto-scaling on your Google Cloud Platform:

    • dataflow.metrics.get

    • monitoring.metricDescriptors.get

    • monitoring.metricDescriptors.list

    • monitoring.monitoredResourceDescriptors.list

    • monitoring.timeSeries.list

  • Obtain a Service Credentials JSON fileCreate a JSON key for the service account on your Google Cloud Platform. You must enter the JSON file content in the SERVICE CREDENTIALS JSON field while adding a new Google Service account during the Cloud Collector configuration.

  • Assign the required subscription permissions – Assign pubsub.subscriptions.consume permission to the service account.

Create a Service Account and Obtain a Project ID

  1. To create a service account in the project in which the Pub/Sub subscription has been created, in the Google Cloud console, navigate to IAM & Admin > Service Accounts > CREATE SERVICE ACCOUNT page.

  2. Select a Cloud project if you already created a project. If not, create a Cloud project.

  3. Enter the project name and edit the automatically generated project ID. Note the Project ID that you set while creating the Google service account. You require to use the project ID while configuring the GCP Pub/Sub Cloud Collector.

  4. For more information and relevant steps, see Creating and managing service accounts in the Google documentation.