Method write
Writes metric data to Monitoring.
HTTP request
POST https://monitoring.api.cloud.yandex.net/monitoring/v2/data/write
Query parameters
Parameter | Description |
---|---|
folderId | Required. ID of the folder that the metric belongs to. The maximum string length in characters is 50. |
service | Required. ID of the service that the metric belongs to. Use The maximum string length in characters is 50. |
Body parameters
{
"ts": "string",
"labels": "object",
"metrics": [
{
"name": "string",
"labels": "object",
"type": "string",
"ts": "string",
"value": "number",
"timeseries": [
{
"ts": "string",
"value": "number"
}
]
}
]
}
Field | Description |
---|---|
ts | string (date-time) Common timestamp for all metrics in RFC3339 text format. |
labels | object Common labels for all metrics as |
metrics[] | object List of metrics. |
metrics[]. name |
string Required. Name of the metric. |
metrics[]. labels |
object Metric labels as |
metrics[]. type |
string Type of the metric. The default value is
|
metrics[]. ts |
string (date-time) Time point in RFC3339 text format. If it is not specified, the current time is used. |
metrics[]. value |
number (double) Required. Metric value in the time point. |
metrics[]. timeseries[] |
object List of several points. |
metrics[]. timeseries[]. ts |
string (date-time) Time point in RFC3339 text format. |
metrics[]. timeseries[]. value |
number (double) Metric value. |
Response
HTTP Code: 200 - OK
{
"writtenMetricsCount": "string",
"errorMessage": "string"
}
Field | Description |
---|---|
writtenMetricsCount | string (int64) Number of successfully written metrics. |
errorMessage | string Error message if the writing failed. |