List
|
|||||
|
|
Lists time series that match a filter. This method does not require a Stackdriver account
Authorization
To use this building block you will have to grant access to at least one of the following scopes:
- View and manage your data across Google Cloud Platform services
- View and write monitoring data for all of your Google and third-party Cloud and API projects
- View monitoring data for all of your Google Cloud and third-party projects
Input
This building block consumes 12 input parameters
Name | Format | Description |
---|---|---|
name Required |
STRING |
The project on which to execute the request. The format is "projects/{project_id_or_number}" |
aggregation.alignmentPeriod |
ANY |
The alignment period for per-time series alignment. If present, alignmentPeriod must be at least 60 seconds. After per-time series alignment, each time series will contain data points only on the period boundaries. If perSeriesAligner is not specified or equals ALIGN_NONE, then this field is ignored. If perSeriesAligner is specified and does not equal ALIGN_NONE, then this field must be defined; otherwise an error is returned |
pageSize |
INTEGER |
A positive number that is the maximum number of results to return. If page_size is empty or more than 100,000 results, the effective page_size is 100,000 results. If view is set to FULL, this is the maximum number of Points returned. If view is set to HEADERS, this is the maximum number of TimeSeries returned |
orderBy |
STRING |
Unsupported: must be left blank. The points in each time series are returned in reverse time order |
aggregation.crossSeriesReducer |
ENUMERATION |
The approach to be used to combine time series. Not all reducer functions may be applied to all time series, depending on the metric type and the value type of the original time series. Reduction may change the metric type of value type of the time series.Time series data must be aligned in order to perform cross-time series reduction. If crossSeriesReducer is specified, then perSeriesAligner must be specified and not equal ALIGN_NONE and alignmentPeriod must be specified; otherwise, an error is returned |
filter |
STRING |
A monitoring filter that specifies which time series should be returned. The filter must specify a single metric type, and can additionally specify metric labels and other information. For example: metric.type = "compute.googleapis.com/instance/cpu/usage_time" AND metric.labels.instance_name = "my-instance-name" |
aggregation.perSeriesAligner |
ENUMERATION |
The approach to be used to align individual time series. Not all alignment functions may be applied to all time series, depending on the metric type and value type of the original time series. Alignment may change the metric type or the value type of the time series.Time series data must be aligned in order to perform cross-time series reduction. If crossSeriesReducer is specified, then perSeriesAligner must be specified and not equal ALIGN_NONE and alignmentPeriod must be specified; otherwise, an error is returned |
pageToken |
STRING |
If this field is not empty then it must contain the nextPageToken value returned by a previous call to this method. Using this field causes the method to return additional results from the previous method call |
interval.startTime |
ANY |
Optional. The beginning of the time interval. The default value for the start time is the end time. The start time must not be later than the end time |
view |
ENUMERATION |
Specifies which information is returned about the time series |
aggregation.groupByFields |
STRING |
The set of fields to preserve when crossSeriesReducer is specified. The groupByFields determine how the time series are partitioned into subsets prior to applying the aggregation function. Each subset contains time series that have the same value for each of the grouping fields. Each individual time series is a member of exactly one subset. The crossSeriesReducer is applied to each subset of time series. It is not possible to reduce across different resource types, so this field implicitly contains resource.type. Fields not specified in groupByFields are aggregated away. If groupByFields is not specified and all the time series have the same resource type, then the time series are aggregated into a single output time series. If crossSeriesReducer is not defined, this field is ignored |
interval.endTime |
ANY |
Required. The end of the time interval |
= Parameter name
= Format
name STRING Required The project on which to execute the request. The format is "projects/{project_id_or_number}" |
aggregation.alignmentPeriod ANY The alignment period for per-time series alignment. If present, alignmentPeriod must be at least 60 seconds. After per-time series alignment, each time series will contain data points only on the period boundaries. If perSeriesAligner is not specified or equals ALIGN_NONE, then this field is ignored. If perSeriesAligner is specified and does not equal ALIGN_NONE, then this field must be defined; otherwise an error is returned |
pageSize INTEGER A positive number that is the maximum number of results to return. If page_size is empty or more than 100,000 results, the effective page_size is 100,000 results. If view is set to FULL, this is the maximum number of Points returned. If view is set to HEADERS, this is the maximum number of TimeSeries returned |
orderBy STRING Unsupported: must be left blank. The points in each time series are returned in reverse time order |
aggregation.crossSeriesReducer ENUMERATION The approach to be used to combine time series. Not all reducer functions may be applied to all time series, depending on the metric type and the value type of the original time series. Reduction may change the metric type of value type of the time series.Time series data must be aligned in order to perform cross-time series reduction. If crossSeriesReducer is specified, then perSeriesAligner must be specified and not equal ALIGN_NONE and alignmentPeriod must be specified; otherwise, an error is returned |
filter STRING A monitoring filter that specifies which time series should be returned. The filter must specify a single metric type, and can additionally specify metric labels and other information. For example: metric.type = "compute.googleapis.com/instance/cpu/usage_time" AND metric.labels.instance_name = "my-instance-name" |
aggregation.perSeriesAligner ENUMERATION The approach to be used to align individual time series. Not all alignment functions may be applied to all time series, depending on the metric type and value type of the original time series. Alignment may change the metric type or the value type of the time series.Time series data must be aligned in order to perform cross-time series reduction. If crossSeriesReducer is specified, then perSeriesAligner must be specified and not equal ALIGN_NONE and alignmentPeriod must be specified; otherwise, an error is returned |
pageToken STRING If this field is not empty then it must contain the nextPageToken value returned by a previous call to this method. Using this field causes the method to return additional results from the previous method call |
interval.startTime ANY Optional. The beginning of the time interval. The default value for the start time is the end time. The start time must not be later than the end time |
view ENUMERATION Specifies which information is returned about the time series |
aggregation.groupByFields STRING The set of fields to preserve when crossSeriesReducer is specified. The groupByFields determine how the time series are partitioned into subsets prior to applying the aggregation function. Each subset contains time series that have the same value for each of the grouping fields. Each individual time series is a member of exactly one subset. The crossSeriesReducer is applied to each subset of time series. It is not possible to reduce across different resource types, so this field implicitly contains resource.type. Fields not specified in groupByFields are aggregated away. If groupByFields is not specified and all the time series have the same resource type, then the time series are aggregated into a single output time series. If crossSeriesReducer is not defined, this field is ignored |
interval.endTime ANY Required. The end of the time interval |
Output
This building block provides 25 output parameters
Name | Format | Description |
---|---|---|
executionErrors[] |
OBJECT |
The Status type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by gRPC (https://github.com/grpc). Each Status message contains three pieces of data: error code, error message, and error details.You can find out more about this error model and how to work with it in the API Design Guide (https://cloud.google.com/apis/design/errors) |
executionErrors[].code |
INTEGER |
The status code, which should be an enum value of google.rpc.Code |
executionErrors[].message |
STRING |
A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client |
executionErrors[].details[] |
OBJECT |
|
executionErrors[].details[].customKey.value |
ANY |
|
timeSeries[] |
OBJECT |
A collection of data points that describes the time-varying values of a metric. A time series is identified by a combination of a fully-specified monitored resource and a fully-specified metric. This type is used for both listing and creating time series |
timeSeries[].metadata |
OBJECT |
Auxiliary metadata for a MonitoredResource object. MonitoredResource objects contain the minimum set of information to uniquely identify a monitored resource instance. There is some other useful auxiliary metadata. Monitoring and Logging use an ingestion pipeline to extract metadata for cloud resources of all types, and store the metadata in this message |
timeSeries[].metadata.userLabels |
OBJECT |
Output only. A map of user-defined metadata labels |
timeSeries[].metadata.userLabels.customKey.value |
STRING |
Output only. A map of user-defined metadata labels |
timeSeries[].metadata.systemLabels |
OBJECT |
Output only. Values for predefined system metadata labels. System labels are a kind of metadata extracted by Google, including "machine_image", "vpc", "subnet_id", "security_group", "name", etc. System label values can be only strings, Boolean values, or a list of strings. For example: { "name": "my-test-instance", "security_group": ["a", "b", "c"], "spot_instance": false } |
timeSeries[].metadata.systemLabels.customKey.value |
ANY |
Output only. Values for predefined system metadata labels. System labels are a kind of metadata extracted by Google, including "machine_image", "vpc", "subnet_id", "security_group", "name", etc. System label values can be only strings, Boolean values, or a list of strings. For example: { "name": "my-test-instance", "security_group": ["a", "b", "c"], "spot_instance": false } |
timeSeries[].valueType |
ENUMERATION |
The value type of the time series. When listing time series, this value type might be different from the value type of the associated metric if this time series is an alignment or reduction of other time series.When creating a time series, this field is optional. If present, it must be the same as the type of the data in the points field |
timeSeries[].metricKind |
ENUMERATION |
The metric kind of the time series. When listing time series, this metric kind might be different from the metric kind of the associated metric if this time series is an alignment or reduction of other time series.When creating a time series, this field is optional. If present, it must be the same as the metric kind of the associated metric. If the associated metric's descriptor must be auto-created, then this field specifies the metric kind of the new descriptor and must be either GAUGE (the default) or CUMULATIVE |
timeSeries[].points[] |
OBJECT |
A single data point in a time series |
timeSeries[].points[].value |
OBJECT |
A single strongly-typed value |
timeSeries[].points[].interval |
OBJECT |
A time interval extending just after a start time through an end time. The start time must not be later than the end time. The default start time is the end time, making the startTime value technically optional. Whether this is useful depends on the MetricKind. If the start and end times are the same, the interval represents a point in time. This is appropriate for GAUGE metrics, but not for DELTA and CUMULATIVE metrics, which cover a span of time |
timeSeries[].metric |
OBJECT |
A specific metric, identified by specifying values for all of the labels of a MetricDescriptor |
timeSeries[].metric.type |
STRING |
An existing metric type, see google.api.MetricDescriptor. For example, custom.googleapis.com/invoice/paid/amount |
timeSeries[].metric.labels |
OBJECT |
The set of label values that uniquely identify this metric. All labels listed in the MetricDescriptor must be assigned values |
timeSeries[].metric.labels.customKey.value |
STRING |
The set of label values that uniquely identify this metric. All labels listed in the MetricDescriptor must be assigned values |
timeSeries[].resource |
OBJECT |
An object representing a resource that can be used for monitoring, logging, billing, or other purposes. Examples include virtual machine instances, databases, and storage devices such as disks. The type field identifies a MonitoredResourceDescriptor object that describes the resource's schema. Information in the labels field identifies the actual resource and its attributes according to the schema. For example, a particular Compute Engine VM instance could be represented by the following object, because the MonitoredResourceDescriptor for "gce_instance" has labels "instance_id" and "zone": { "type": "gce_instance", "labels": { "instance_id": "12345678901234", "zone": "us-central1-a" }} |
timeSeries[].resource.type |
STRING |
Required. The monitored resource type. This field must match the type field of a MonitoredResourceDescriptor object. For example, the type of a Compute Engine VM instance is gce_instance. For a list of types, see Monitoring resource types and Logging resource types |
timeSeries[].resource.labels |
OBJECT |
Required. Values for all of the labels listed in the associated monitored resource descriptor. For example, Compute Engine VM instances use the labels "project_id", "instance_id", and "zone" |
timeSeries[].resource.labels.customKey.value |
STRING |
Required. Values for all of the labels listed in the associated monitored resource descriptor. For example, Compute Engine VM instances use the labels "project_id", "instance_id", and "zone" |
nextPageToken |
STRING |
If there are more results than have been returned, then this field is set to a non-empty value. To see the additional results, use that value as pageToken in the next call to this method |
= Parameter name
= Format
executionErrors[] OBJECT The Status type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by gRPC (https://github.com/grpc). Each Status message contains three pieces of data: error code, error message, and error details.You can find out more about this error model and how to work with it in the API Design Guide (https://cloud.google.com/apis/design/errors) |
executionErrors[].code INTEGER The status code, which should be an enum value of google.rpc.Code |
executionErrors[].message STRING A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client |
executionErrors[].details[] OBJECT |
executionErrors[].details[].customKey.value ANY |
timeSeries[] OBJECT A collection of data points that describes the time-varying values of a metric. A time series is identified by a combination of a fully-specified monitored resource and a fully-specified metric. This type is used for both listing and creating time series |
timeSeries[].metadata OBJECT Auxiliary metadata for a MonitoredResource object. MonitoredResource objects contain the minimum set of information to uniquely identify a monitored resource instance. There is some other useful auxiliary metadata. Monitoring and Logging use an ingestion pipeline to extract metadata for cloud resources of all types, and store the metadata in this message |
timeSeries[].metadata.userLabels OBJECT Output only. A map of user-defined metadata labels |
timeSeries[].metadata.userLabels.customKey.value STRING Output only. A map of user-defined metadata labels |
timeSeries[].metadata.systemLabels OBJECT Output only. Values for predefined system metadata labels. System labels are a kind of metadata extracted by Google, including "machine_image", "vpc", "subnet_id", "security_group", "name", etc. System label values can be only strings, Boolean values, or a list of strings. For example: { "name": "my-test-instance", "security_group": ["a", "b", "c"], "spot_instance": false } |
timeSeries[].metadata.systemLabels.customKey.value ANY Output only. Values for predefined system metadata labels. System labels are a kind of metadata extracted by Google, including "machine_image", "vpc", "subnet_id", "security_group", "name", etc. System label values can be only strings, Boolean values, or a list of strings. For example: { "name": "my-test-instance", "security_group": ["a", "b", "c"], "spot_instance": false } |
timeSeries[].valueType ENUMERATION The value type of the time series. When listing time series, this value type might be different from the value type of the associated metric if this time series is an alignment or reduction of other time series.When creating a time series, this field is optional. If present, it must be the same as the type of the data in the points field |
timeSeries[].metricKind ENUMERATION The metric kind of the time series. When listing time series, this metric kind might be different from the metric kind of the associated metric if this time series is an alignment or reduction of other time series.When creating a time series, this field is optional. If present, it must be the same as the metric kind of the associated metric. If the associated metric's descriptor must be auto-created, then this field specifies the metric kind of the new descriptor and must be either GAUGE (the default) or CUMULATIVE |
timeSeries[].points[] OBJECT A single data point in a time series |
timeSeries[].points[].value OBJECT A single strongly-typed value |
timeSeries[].points[].interval OBJECT A time interval extending just after a start time through an end time. The start time must not be later than the end time. The default start time is the end time, making the startTime value technically optional. Whether this is useful depends on the MetricKind. If the start and end times are the same, the interval represents a point in time. This is appropriate for GAUGE metrics, but not for DELTA and CUMULATIVE metrics, which cover a span of time |
timeSeries[].metric OBJECT A specific metric, identified by specifying values for all of the labels of a MetricDescriptor |
timeSeries[].metric.type STRING An existing metric type, see google.api.MetricDescriptor. For example, custom.googleapis.com/invoice/paid/amount |
timeSeries[].metric.labels OBJECT The set of label values that uniquely identify this metric. All labels listed in the MetricDescriptor must be assigned values |
timeSeries[].metric.labels.customKey.value STRING The set of label values that uniquely identify this metric. All labels listed in the MetricDescriptor must be assigned values |
timeSeries[].resource OBJECT An object representing a resource that can be used for monitoring, logging, billing, or other purposes. Examples include virtual machine instances, databases, and storage devices such as disks. The type field identifies a MonitoredResourceDescriptor object that describes the resource's schema. Information in the labels field identifies the actual resource and its attributes according to the schema. For example, a particular Compute Engine VM instance could be represented by the following object, because the MonitoredResourceDescriptor for "gce_instance" has labels "instance_id" and "zone": { "type": "gce_instance", "labels": { "instance_id": "12345678901234", "zone": "us-central1-a" }} |
timeSeries[].resource.type STRING Required. The monitored resource type. This field must match the type field of a MonitoredResourceDescriptor object. For example, the type of a Compute Engine VM instance is gce_instance. For a list of types, see Monitoring resource types and Logging resource types |
timeSeries[].resource.labels OBJECT Required. Values for all of the labels listed in the associated monitored resource descriptor. For example, Compute Engine VM instances use the labels "project_id", "instance_id", and "zone" |
timeSeries[].resource.labels.customKey.value STRING Required. Values for all of the labels listed in the associated monitored resource descriptor. For example, Compute Engine VM instances use the labels "project_id", "instance_id", and "zone" |
nextPageToken STRING If there are more results than have been returned, then this field is set to a non-empty value. To see the additional results, use that value as pageToken in the next call to this method |