In Google Cloud Pub/Sub, a topic receives the logs your Google Cloud Platform (GCP) environment exports. Those logs are then retrieved by your GCP Sensor via subscriptions. Depending on the needs of your particular implementation, you may only need to create a single topic to receive all of your exported logs from all of the export sinks you configure. However, you may find that it would be advantageous for your implementation to include multiple topics, in which case any number of topics are supported.
To create a Cloud Pub/Sub topic
- Log in to your GCP environment and go to the Topics page under Pub/Sub.
- Click Create Topic.
- Give this topic a name.
Note: Make note of this name, as you will need to reference it when creating your export sinks.
- Under Encryption, be sure that Google-managed key is selected.
- Click Create Topic.
Now you are ready to create a subscription for this topic.
To create a subscription for a Cloud Pub/Sub topic
- Go to the Topics page under Pub/Sub and open the topic for which you want to create a subscription.
- Scroll to the bottom of the page and click Create Subscription.
- Name your subscription using the Subscription ID field.
Note: This is the name that will appear in the UI of your GCP Sensor under the Log Subscriptions tab.
- Enter the required information and settings for your subscription.
- Delivery type: Select Pull.
- Subscription expiration: Select Never expire.
- Acknowledgment deadline: You may leave this as its default or adjust it to suit your needs.
- Message retention duration: You may leave this as its default or adjust it to suit your needs.
- Click Create Subscription.
- Click Enable to enable the subscription.
At this point, you may go to the Sensor Details within your USM Anywhere Sensor and review the Log Subscriptions tab to verify that this subscription appears as expected.
Important: While your subscription is visible at this point, it will not begin reporting events until you have configured at least one export sink to publish to this topic. See Manually Create and Configure an Export Sink for Your GCP Sensor for more information.