Troubleshoot Google Cloud Platform monitoring setup

To investigate potential issues regarding Google Cloud Platform monitoring, follow the instructions below.

1. Verify installation

Check whether installation was successful.

2. Enable self-monitoring optional

Self-monitoring allows quick diagnosis to see if your monitoring function processes and sends logs to Dynatrace properly.

To enable self-monitoring for the GCP function deployment

  1. In the GCP console, go to Cloud Functions.
  2. Select dynatrace-gcp-function.
  3. Select Edit.
  4. Under Runtime, build and connection settings, change the value of the SELF_MONITORING_ENABLED runtime environment variable to true.
  5. Select Next, and then select Deploy to apply the new settings.

Self-monitoring metrics

The Dynatrace GCP function reports self-monitoring metrics as Google Cloud metrics. See below the list of self-monitoring metrics for metric/log ingest.

Self-monitoring metrics for metric ingest (for GKE and GCP function deployments)

Metric Description
MINT lines ingested The number of data points (metrics with dimension or dimensions) ingested by Dynatrace Metrics API v2 in a given interval.
Dynatrace connectivity The connectivity status (1 = OK) between the monitoring function and Dynatrace. Connectivity can be broken due to an incorrect Dynatrace URL, an incorrect API token, or network connectivity issues.
Dynatrace failed requests count The number of requests rejected by Dynatrace Metrics API v2. The reason for failure can be that the data point value doesn't comply with the metric ingestion protocol syntax, or that the limit for metric ingestion is exceeded.
Dynatrace requests count The number of requests sent to Dynatrace.

Self-monitoring metrics for log ingest (for GKE deployment)

Metric Description
All requests All requests sent to Dynatrace
Dynatrace connectivity failures The number of failed requests to connect to Dynatrace
Too old records The number of log records that were invalid because the timestamp was too old
Too long content size The number of records with content exceeding the maximum content length
Parsing errors The number of errors that occurred while parsing logs
Processing time The total amount of time for processing logs
Sending time The total amount of time for sending logs
Sent logs entries The number of log entries sent to Dynatrace
Log ingest payload size The size of the log payload sent to Dynatrace (in kb)

View self-monitoring metrics

The self-monitoring dashboards present multiple metrics related to the Dynatrace connectivity status, amount of data processed, and execution times.

To view the dashboards with self-monitoring metrics

  1. In your GCP console, go to the GCP Monitoring service.
  2. Select Dashboards.
  3. Depending on the type of deployment selected, search for
    • The dynatrace-gcp-function log self monitoring dashboard (for logs)
    • The dynatrace-gcp-function self monitoring dashboard (for metrics)

Example dashboard: self-monitor