read method
Returns data on metrics.
HTTP request
POST https://monitoring.api.cloud.yandex.net/monitoring/v2/data/read
Query parameters
Parameter | Description |
---|---|
folderId | Required field. ID of the folder that the metric belongs to. Maximum string length: 50 characters. |
Parameters in the request body
{
"query": "string",
"fromTime": "string",
"toTime": "string",
"downsampling": {
"gridAggregation": "string",
"gapFilling": "string",
// `downsampling` includes only one of the fields `maxPoints`, `gridInterval`, `disabled`
"maxPoints": "string",
"gridInterval": "string",
"disabled": true,
// end of the list of possible `downsampling` fields
}
}
Field | Description |
---|---|
query | string Required field. Query text. The syntax is described in Query language in Monitoring. |
fromTime | string (date-time) Required field. Interval starting point in RFC3339 format. String in RFC3339 format. |
toTime | string (date-time) Required field. Interval end point in RFC3339 format. String in RFC3339 format. |
downsampling | object Required field. Downsampling parameters. |
downsampling. gridAggregation |
string An aggregation function that is used for decimation. List of available aggregation functions used for decimation.
|
downsampling. gapFilling |
string Parameters for filling in missing data. List of methods for filling in missing data under decimation.
|
downsampling. maxPoints |
string (int64) downsampling only includes one of the maxPoints , gridInterval , disabled fieldsMaximum number of points to be received in response to a request. The value must be greater than 10. |
downsampling. gridInterval |
string (int64) downsampling only includes one of the maxPoints , gridInterval , disabled fieldsTime window (grid) in milliseconds. Used for downsampling. Points inside the window are combined into one using the aggregation function. The value must be greater than 0. |
downsampling. disabled |
boolean (boolean) downsampling only includes one of the maxPoints , gridInterval , disabled fieldsIndicates that the data in the response to the query will be returned without downsampling. |
Response
HTTP Code: 200 - OK
{
"metrics": [
{
"name": "string",
"labels": "object",
"type": "string",
"timeseries": {
"timestamps": [
"number"
],
"doubleValues": [
"number"
],
"int64Values": [
"number"
]
}
}
]
}
Field | Description |
---|---|
metrics[] | object List of the metrics with time points. |
metrics[]. name |
string Metric name. |
metrics[]. labels |
object List of metric labels in |
metrics[]. type |
string Type of metric.
|
metrics[]. timeseries |
object Metric values. |
metrics[]. timeseries. timestamps[] |
number (int64) List of timestamps in Unix millisecond format. |
metrics[]. timeseries. doubleValues[] |
number (double) List of fractional metric values. |
metrics[]. timeseries. int64Values[] |
number (int64) List of integer metric values. Only available for metrics of the |