class Monitoring extends Message

Monitoring configuration of the service.

The example below shows how to configure monitored resources and metrics for monitoring. In the example, a monitored resource and two metrics are defined. The library.googleapis.com/book/returned_count metric is sent to both producer and consumer projects, whereas the library.googleapis.com/book/overdue_count metric is only sent to the consumer project. monitored_resources: - type: library.googleapis.com/branch labels: - key: /city description: The city where the library branch is located in. - key: /name description: The name of the branch. metrics: - name: library.googleapis.com/book/returned_count metric_kind: DELTA value_type: INT64 labels: - key: /customer_id - name: library.googleapis.com/book/overdue_count metric_kind: GAUGE value_type: INT64 labels: - key: /customer_id monitoring: producer_destinations: - monitored_resource: library.googleapis.com/branch metrics: - library.googleapis.com/book/returned_count consumer_destinations: - monitored_resource: library.googleapis.com/branch metrics: - library.googleapis.com/book/returned_count - library.googleapis.com/book/overdue_count

Generated from protobuf message google.api.Monitoring

Methods

__construct(array $data = NULL)

Constructor.

RepeatedField
getProducerDestinations()

Monitoring configurations for sending metrics to the producer project.

$this
setProducerDestinations(MonitoringDestination[]|RepeatedField $var)

Monitoring configurations for sending metrics to the producer project.

RepeatedField
getConsumerDestinations()

Monitoring configurations for sending metrics to the consumer project.

$this
setConsumerDestinations(MonitoringDestination[]|RepeatedField $var)

Monitoring configurations for sending metrics to the consumer project.

Details

at line 89
__construct(array $data = NULL)

Constructor.

Parameters

array $data { Optional. Data for populating the Message object.

@type \Google\Api\Monitoring\MonitoringDestination[]|\Google\Protobuf\Internal\RepeatedField $producer_destinations
      Monitoring configurations for sending metrics to the producer project.
      There can be multiple producer destinations, each one must have a
      different monitored resource type. A metric can be used in at most
      one producer destination.
@type \Google\Api\Monitoring\MonitoringDestination[]|\Google\Protobuf\Internal\RepeatedField $consumer_destinations
      Monitoring configurations for sending metrics to the consumer project.
      There can be multiple consumer destinations, each one must have a
      different monitored resource type. A metric can be used in at most
      one consumer destination.

}

at line 103
RepeatedField getProducerDestinations()

Monitoring configurations for sending metrics to the producer project.

There can be multiple producer destinations, each one must have a different monitored resource type. A metric can be used in at most one producer destination.

Generated from protobuf field repeated .google.api.Monitoring.MonitoringDestination producer_destinations = 1;

Return Value

RepeatedField

at line 118
$this setProducerDestinations(MonitoringDestination[]|RepeatedField $var)

Monitoring configurations for sending metrics to the producer project.

There can be multiple producer destinations, each one must have a different monitored resource type. A metric can be used in at most one producer destination.

Generated from protobuf field repeated .google.api.Monitoring.MonitoringDestination producer_destinations = 1;

Parameters

MonitoringDestination[]|RepeatedField $var

Return Value

$this

at line 135
RepeatedField getConsumerDestinations()

Monitoring configurations for sending metrics to the consumer project.

There can be multiple consumer destinations, each one must have a different monitored resource type. A metric can be used in at most one consumer destination.

Generated from protobuf field repeated .google.api.Monitoring.MonitoringDestination consumer_destinations = 2;

Return Value

RepeatedField

at line 150
$this setConsumerDestinations(MonitoringDestination[]|RepeatedField $var)

Monitoring configurations for sending metrics to the consumer project.

There can be multiple consumer destinations, each one must have a different monitored resource type. A metric can be used in at most one consumer destination.

Generated from protobuf field repeated .google.api.Monitoring.MonitoringDestination consumer_destinations = 2;

Parameters

MonitoringDestination[]|RepeatedField $var

Return Value

$this