Support Center Home

Setting up GCP Logs Ingestion

Send logs from Google Cloud Platform (GCP) to LM Logs for analysis.


  • LogicMonitor API tokens to authenticate all requests to the log ingestion API.
  • LM Logs supports GCP Cloud Function Logs and Virtual Machine (VM) Instance logs.

Installation instructions

1. At the top right of your Google Cloud account, click Activate Cloud Shell.

This opens the Cloud Shell Terminal below the workspace.

2. In the Terminal, run the following commands to select the project.

gcloud config set project [PROJECT_ID]

3. Run the following command to install the integration:

source <(curl -s && deploy_lm-logs

Installing the integration creates these resources:

  • A PubSub topic named export-logs-to-lm and a pull subscription.
  • A Virtual Machine (VM) named lm-logs-forwarder.

Note: You will be prompted to confirm the region where the VM is deployed. This should already be configured within your project.

Configure the log forwarder

1. After the installation script completes, go the Compute Engine > VM Instances and select lm-logs-forwarder.

2. Under Remote access, select SSH.

3. SSH into the VM (lm-logs-forwarder) and run the following command, filling in the values:


source <(curl -s

Export logs from Logging to PubSub

You need to create a sink from Logging to the PubSub topic export-logs-to-lm (this was created at installation).

1. In the Logging page, filter the logs that you want to export.

Note: We recommend that you also use the filters to remove logs that contain sensitive information so that they are not sent to LogicMonitor

2. Click Actions > Create sink and under Sink details, provide a name.

3. Under Sink destination, choose Cloud Pub/Sub as the destination and select export-logs-to-lm.

Note: the pub/sub can be located in a different project.

4. Click Create sink.

If there are no issue, you should see the logs stream into the Logs page in LogicMonitor.

Removing the integration

Run the following command to delete the integration and all its resources:

source <(curl -s && delete_lm-logs

In This Article