Deploy Dynatrace integration using a Google Cloud Function

Install

To deploy the Dynatrace integration as a Google Cloud Function, follow the instructions below.

Prerequisites

To deploy the Dynatrace GCP function in Google Cloud Shell, download and run the installation script below.

wget https://raw.githubusercontent.com/dynatrace-oss/dynatrace-gcp-function/master/scripts/setup.sh -O setup.sh ; chmod a+x setup.sh ; ./setup.sh

Note: The Dynatrace GCP Function uses Cloud Scheduler, which requires the App Engine application. If you don't have App Engine installed, the installer script will prompt you to create App Engine and select the region where you want the installer script to run.

The installation script will prompt for the following parameters:

  • GCP project ID - The ID of the Google Cloud project where you want to deploy the Dynatrace GCP function. The default is set to the current project ID, for the gcloud CLI.
  • Function size - The amount of memory that you want to allocate to the function. You can select one of the following:
    • [s] - Small (allocates 256 MB memory to the function). Select this option if you have up to 500 GCP service instances.
    • [m] - Medium (allocates 512 MB memory to the function). Select this option if you have up to 1,000 GCP service instances.
    • [l] - Large (allocates 2,048 MB memory to the function). Select this option if you have up to 5,000 GCP service instances.

Note: You can adjust the amount of memory after installation.

  • Dynatrace tenant URI - Your Dynatrace environment URL. See Prerequisites for details.
  • Dynatrace API token - Your Dynatrace API token. See Prerequisites for details.

After deploying the integration, you can see metrics from monitored services. If you want to add services to monitoring, see Expand monitoring when using a Google Cloud Function.

Expand monitoring

There are two ways to add services to Dynatrace monitoring when using a Google Cloud Function: via the service configuration file or using the GCP console. See below for instructions.

To add services in the service configuration file

  1. Download the activation-config.yaml service configuration file.
wget https://raw.githubusercontent.com/dynatrace-oss/dynatrace-gcp-function/master/activation-config.yaml
  1. Edit the activation.metrics.services section in activation-config.yaml by uncommenting the services you want to monitor.

  2. Download and run the dynatrace-gcp-function installation script in the same folder where you downloaded activation-config.yaml.

wget https://raw.githubusercontent.com/dynatrace-oss/dynatrace-gcp-function/master/scripts/setup.sh -O setup.sh ; chmod a+x setup.sh ; ./setup.sh