We just raised $142 million in our Series D Round! Read About Our Plans for the Future

Google Cloud Pub/Sub Google Cloud Pub/Sub

Last Updated: Jun. 29, 2022

Coralogix provides a predefined function to forward your logs from Google Cloud’s Pub/sub straight to Coralogix.
Our integration code is open source and can be found here.
We welcome feedback and open issues.

Requirements

  • A Coralogix account
  • A Working Pub/Sub topic in your GCP account (If you need help creating it, see here).
  • Installation of GCP CLI
  • A working GCP topic
  • Permissions to configure a function

Installation

We will be creating a custom function to act as a consumer for the topic.

The process is basically cloning the repo, and running the installation command.

$ git clone https://github.com/coralogix/coralogix-gcp-serverless.git &&
$ cd coralogix-gcp-serverles

$ gcloud functions deploy gcp-pub-sub \
        --project=<YOUR_GCP_PROJECT_ID> \
        --region=<GCP_REGION_NAME> \
        --runtime=python38 \
        --memory=1024MB \
        --timeout=60s \
        --entry-point=to_coralogix \
        --source=gcp-pub-sub \
        --trigger-resource=<YOUR_PUBSUB_TOPIC_NAME> \
        --trigger-event=google.pubsub.topic.publish \
        --set-env-vars="private_key=<YOUR_PRIVATE_KEY>,app_name=<APP_NAME>,sub_name=<SUB_NAME>,CORALOGIX_LOG_URL=https://<Cluster_api_URL>:443/api/v1/logs"

Coralogix Endpoints

RegionLogs Endpoint
EUapi.coralogix.com
EU2api.eu2.coralogix.com
USapi.coralogix.us
SGapi.coralogixsg.com
INapi.app.coralogix.in

Any issues? Please contact our support via our in-app chat!

On this page