Cloud Monitoring overview

This document provides an overview of the services that Cloud Monitoring provides. These services can help you to understand the behavior, health, and performance of your applications and of other Trusted Cloud by S3NS services. Cloud Monitoring automatically collects and stores performance information for most Trusted Cloud by S3NS services.

Collected metrics

Cloud Monitoring collects and stores System metrics generated by Trusted Cloud by S3NS services. These metrics provide information about how a service is operating.

Query metrics

We recommend that you use Grafana and PromQL to query and visualize metric data. For more information, see PromQL in Cloud Monitoring.

The Cloud Monitoring API also provides support for reading metric data. For more information, see the timeSeries.list reference page. When you you retrieve metric data by using the Monitoring API, the query in your API command can use Monitoring filter expressions.

Cloud Monitoring data model

This section introduces the Cloud Monitoring data model:

  • A metric type describes something that is measured. Examples of metric types include a VM's CPU utilization and the percentage of a disk that is used.

  • A time series is a data structure that contains time-stamped measurements of a metric and information about the source and meaning of those measurements.

Here are some details about what a time series contains:

  • The points array contains the time-stamped measurements.

    The following is an example of a points array with two values:

      "points": [
        {
          "interval": {
            "startTime": "2020-07-27T20:20:21.597143Z",
            "endTime": "2020-07-27T20:20:21.597143Z"
          },
          "value": {
            "doubleValue": 0.473005
          }
        },
        {
          "interval": {
            "startTime": "2020-07-27T20:19:21.597239Z",
            "endTime": "2020-07-27T20:19:21.597239Z"
          },
          "value": {
            "doubleValue": 0.473025
          }
        },
      ],
    

    To understand the meaning of a value, you need to refer to the other data included in the time series and to the definitions of that data.

  • The resource field describes the hardware or software component that is being monitored. In Cloud Monitoring, the hardware or software component is referred to as the monitored resource. Examples of monitored resources include Compute Engine instances and App Engine applications. For a list of monitored resources, see the Monitored resource list.

    The following is an example of a resource field:

      "resource": {
        "type": "gce_instance",
        "labels": {
          "instance_id": "2708613220420473591",
          "zone": "us-east1-b",
          "project_id": "sampleproject"
        }
      }
    
    • The type field lists the monitored resource as a gce_instance, which indicates that these measurements are taken on a Compute Engine VM instance.

    • The labels field contains key-value pairs that provide additional information about the monitored resource. For a gce_instance type, the labels identify the VM instance that is being monitored.

  • The metric field describes what is being measured.

    The following is an example of a metric field:

      "metric": {
        "labels": {
          "instance_name": "test"
        },
        "type": "compute.googleapis.com/instance/cpu/utilization"
      },
    
    • For Trusted Cloud by S3NS services, the type field specifies the service and what is being monitored. In this example, the Compute Engine service measuring the CPU utilization.
    • The labels field contains key-value pairs that provide additional information about the measurement. These labels are defined as part of the MetricDescriptor, which is a data structure that defines the attributes of the measured data. The MetricDescriptor for the metric compute.googleapis.com/instance/cpu/utilization includes the label instance_name.
  • The metricKind field describes the relationship between adjacent measurements within a time series:

    • GAUGE metrics store the value of the thing being measured at a given moment in time—for example, an hourly temperature record.

    • CUMULATIVE metrics store the accumulated value of the thing being measured at a given moment in time—for example, an odometer in a vehicle.

    • DELTA metrics store the change in the value of the thing being measured over a specified period—for example, a stock summary that shows the stock's gains or losses.

  • The valueType field describes the data type for the measurement: INT64, DOUBLE, BOOL, STRING, or DISTRIBUTION.

Cloud Monitoring writes one time series for each combination of resource and metric label values. You can use these labels to group and to filter time series.

What's next