Skip to main content

Google Cloud Logging

You can send your service logs to Google Cloud Logging to store, search, analyze, monitor, and alert on log data from your Aiven services.

Prerequisites

Set up Cloud Logging integration in Aiven Console

Step 1. Create the integration endpoint

  1. Go to Integration Endpoints.
  2. Select Google Cloud Logging.
  3. Click Add new endpoint.
  4. Enter a name.
  5. Enter the GCP Project ID and Log ID from Google Cloud.
  6. Enter the Google Service Account Credentials in JSON format.
  7. Click Create.

Step 2. Add the integration endpoint to your service

  1. Go to the service you want to add the logs integration to.
  2. On the sidebar, click Integrations.
  3. Select Google Cloud Logging.
  4. Choose the endpoint that you created.
  5. Click Enable.

Set up Cloud Logging integration using the CLI

Step 1. Create the integration endpoint

avn service integration-endpoint-create --project your-project-name         \
-d "Google Cloud Logging" -t external_google_cloud_logging \
-c project_id=your-gcp-project-id \
-c log_id=my-aiven-service-logs \
-c service_account_credentials='{"type": "service_account"...}

Step 2. Add the integration endpoint to your service

  1. Get the endpoint identifier:

    avn service integration-endpoint-list --project your-project-name
  2. Use the endpoint_id to attach the service to the endpoint:

    avn service integration-create --project your-project-name  \
    -t external_google_cloud_logging -s your-service \
    -D <ENDPOINT_ID>