Time series query for the Google Stackdriver Monitoring API (V3)
_.
.. _Google Stackdriver Monitoring API (V3): https://cloud.google.com/monitoring/api/ref_v3/rest/v3/ projects.timeSeries/list
Classes
Query
Query(
client,
project,
metric_type="compute.googleapis.com/instance/cpu/utilization",
end_time=None,
days=0,
hours=0,
minutes=0,
)
Query object for retrieving metric data.
Name | Description |
client |
:class:`google.cloud.monitoring_v3.gapic. metric_service_client.MetricServiceClient`
The client to use. |
project |
str
The project ID or number. |
metric_type |
str
The metric type name. The default value is :data: |
end_time |
`datetime.datetime`
(Optional) The end time (inclusive) of the time interval for which results should be returned, as a datetime object. The default is the start of the current minute. The start time (exclusive) is determined by combining the values of |
days |
int
The number of days in the time interval. |
hours |
int
The number of hours in the time interval. |
minutes |
int
The number of minutes in the time interval. |
Type | Description |
`ValueError | if ``end_time`` is specified but ``days``, ``hours``, and ``minutes`` are all zero. If you really want to specify a point in time, use select_interval. .. _supported metrics: https://cloud.google.com/monitoring/api/metrics |