> ## Documentation Index
> Fetch the complete documentation index at: https://docs.controlplane.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Stackdriver

> Configure log shipping from Control Plane to Google Cloud Stackdriver (Operations Suite) for monitoring and log analysis.

## Overview

[Stackdriver](https://cloud.google.com/products/operations), 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](https://cloud.google.com/products/operations), you can collect and analyze logs, monitor infrastructure and application metrics, set up custom alerts, and automate responses to critical events. By leveraging [Stackdriver](https://cloud.google.com/products/operations), 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 them, follow the guide here: [GCP key](/reference/secret#google-cloud-platform-gcp)

## Step 2 - Configure External Logging

External logging can be configured by using either the [UI Console](#enable-logging-using-the-ui-console) or [CLI](#enable-logging-using-the-cli).

<TIP>Use a valid GCP location for the `location` field. E.g. us-east1</TIP>

### 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](#step-1-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 of an [Org](/reference/org) manifest (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](#step-1-credential-procurement) section to obtain and configure the necessary credentials.

* Substitute: ORG\_NAME, GCP\_SECRET and possibly the location.

```yaml YAML theme={null}
kind: org
name: ORG_NAME
spec:
  logging:
    stackdriver:
      location: us-east1
      credentials: //secret/GCP_SECRET
```
