Overview

Stackdriver, now known as Google Cloud Operations Suite, is a powerful monitoring, logging, and diagnostics tool for Google Cloud Platform (GCP) and other cloud environments. It offers a range of features to help you gain deep insights into your system’s performance and health.

With Stackdriver, you can collect and analyze logs, monitor infrastructure and application metrics, set up custom alerts, and automate responses to critical events. By leveraging Stackdriver, you can enhance your operational efficiency, quickly identify and resolve issues, and ensure the reliability and stability of your applications and services.

Follow the steps below to configure log shipping to Stackdriver.

Step 1 - Credential Procurement

GCP credentials are required to ship logs to Stackdriver.

To obtain GCP credentials and store it, follow the guide here: GCP key

Step 2 - Configure External Logging

External logging can be configured by using either the UI Console or CLI.

Enable Logging using the UI Console

  1. From the Control Plane Console UI, click on Org in the left menu.
  2. Click External Logs in the middle context menu.
  3. Select Stackdriver and fill out the required fields.
  4. Select the GCP secret created to authenticate to GCP. Refer to the credential procurement section to obtain and configure the necessary credentials.
  5. Click Save.
  6. After the configuration is complete, log entries will be available at Stackdriver within a few minutes.

Enable Logging using the CLI

The external logging configuration can be created / updated using the CLI’s cpln org patch ORG_NAME -f FILE.yaml command.

Below is an example Org manifests (in YAML). Edit and save the YAML as a file and use it as an input to the CLI’s cpln org patch ORG_NAME -f FILE.yaml command.

Refer to the credential procurement section to obtain and configure the necessary credentials.

  • Substitute: ORG_NAME, GCP_SECRET and possibly the location.
YAML
kind: org
name: ORG_NAME
spec:
  logging:
    stackdriver:
      location: us-east1
      credentials: //secret/GCP_SECRET