- Create a sink for logs.
- Create a service account.
- Create a pull subscription.
- Contact Chronosphere Support.
Create a sink for logs
First, you need to create a sink that defines the service type and destination to route your logs.- In the Google Cloud Logs Console, in the left navigation, click Log Router to open the Log router page.
- Follow the steps in the Google Cloud documentation to create a sink.
- Select Cloud Pub/Sub topic as the sink service.
- 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.
- Complete the remaining steps to create the sink.
Create a service account
After creating a sink, you create a service account in Google Cloud that Observability Platform impersonates.- In the Google Cloud console, create a service account.
-
Add the Observability Platform principal to the Google Cloud service account.
Each Google Cloud service account must grant access to the Observability Platform
principal to impersonate them. The Observability Platform principal format is:
ADDRESS: Your company name prefixed to your Observability Platform instance that ends in.chronosphere.io. For example,MY_COMPANY.chronosphere.io.
a,b, orc). Check with your account team to ensure you have the correct format. Grant the principal theiam.serviceAccountTokenCreatorrole. - Enter information for the remaining fields to finish creating the service account.
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.- In the Google Cloud console, Create a pull subscription.
- In the Delivery type menu, select Pull.
-
Configure the following recommended settings:
*Set Message retention duration to less than 24 hours to avoid storage costs.
Setting Value Message retention duration 23 hours* Expiration period Never expire Acknowledgement deadline 60 seconds Exactly once delivery No Message ordering No Dead lettering No Retry policy Retry after exponential backoff delay -
Grant access to the Pub/Sub you created by assigning the following roles to your
new internal service account:
roles/pubsub.subscriberroles/pubsub.viewer
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-ACCOUNTis the name of the Google Cloud service account you created in create a service account.PROJECT-IDis the ID of your Google Cloud project.
-
The name of the logging sink subscription you created, such as
SUBSCRIPTIONis the name of the pull subscription you created in create a pull subscription.