Introduction
Google cloud logs streaming allows you to forward logs generated within your Google Cloud Platform (GCP) environment to OpsRamp. By streaming logs to OpsRamp, you can centralize log management, enhance monitoring capabilities, and improve incident response times.
To stream Google Cloud Platform (GCP) logs into OpsRamp, follow below steps to set up a Cloud Pub/Sub Topic and a Logs Routing Sink:
Create a cloud Pub/Sub topic
Sign in to the Google Cloud Platform.
Navigate to the Pub/Sub Topic page.
In the Topics section, click Create Topic.
The Create Topic details page is displayed.
In the Topic ID field, enter an ID for your topic. Retain the option Add a default subscription and do not select the other options.
For encryption, select Google-managed encryption key.
Click Create Topic.
After creating the topic, navigate to the Subscriptions section and click Edit for the topic you created in the previous step.
Select Delivery Type as Push.
In the Endpoint URL field, enter the OpsRamp HTTP endpoint URL.
Leave all other options as default and click Update.
Logs routing sink
- In the Google Cloud Console, navigate to the Logs Router page and select your existing Cloud project.
- Click on the Create Sink action.
- In the Sink details panel, enter the following information:
- Sink name: Provide an identifier for the sink.
- Sink description (optional): Describe the purpose or use case for the sink.
- In the Sink destination panel, select the sink service and destination:
- Select sink service: Choose “Cloud Pub/Sub Topic”.
- Select a cloud Pub/Sub Topic: Select the topic created in the previous step.
- In the Choose logs to include in sink panel enter the following information:
- In the Build inclusion filter field, enter a filter expression that matches the log entries you want to include. If no filter is set, all logs from your selected resource are routed to the destination.
- (Optional) In the Choose logs to filter out of sink" panel:
- In the Exclusion filter name field, enter a name.
- In the Build an exclusion filter field, enter a filter expression that matches the log entries you want to exclude. You can also use the sample function to select a portion of the log entries to exclude.
- Click Create Sink.
Once this configuration setup is completed in Google Cloud Platform, you can analyze logs in the OpsRamp Logs Explorer.
Supported labels
When integrating Googl cloud logs with OpsRamp, the following labels can be used to categorize and manage your log data effectively:
- logName
- projectId
- podName
- namespaceName
- location
- containerName
- clusterName
- resourceType
- severity