Metric
A Metric is a monitoring metric of a specific cloud service delivered from a DataSource.
Package : spaceone.api.monitoring.v1
Metric
Method
Request
Response
list
GET /monitoring/v1/data-source/{data_source_id}/metrics
Gets a list of all Metrics of one or more specified Resources. The parameter
resourcesis a list of Resources from which to get a list of Metrics collected.
Type
Message
Request
Response
{
"data_source_id": "ds-31190a65a42a",
"resource_type": "inventory.CloudService",
"resources": [
"cloud-svc-cd0105d255da"
],
"domain_id": "domain-58010aa2e451"
}{
"metrics": [
{
"key": "AWS/EC2.CPUUtilization",
"name": "CPUUtilization",
"unit": {
"y": "Percent",
"x": "Timestamp"
},
"chart_type": "line",
"chart_options": {}
},
{
"key": "AWS/EC2.NetworkIn",
"name": "NetworkIn",
"unit": {
"y": "Bytes",
"x": "Timestamp"
},
"chart_type": "line",
"chart_options": {}
}
],
"available_resources": {
"cloud-svc-cd0105d255da": true
},
"domain_id": "domain-58010aa2e451"
}get_data
GET /monitoring/v1/data-source/{data_source_id}/metric-data
Gets data of a single Metric. You must specify the parameter
metricto get data of. You can specify theperiodto get data for.
Type
Message
Request
Response
{
"data_source_id": "ds-31190a65a42a",
"resource_type": "inventory.CloudService",
"resources": [
"cloud-svc-cd0105d255da"
],
"metric": "AWS/EC2.CPUUtilization",
"start": "2022-06-21T03:11:29.438Z",
"end": "2022-06-21T04:11:29.438Z",
"stat": "AVERAGE",
"domain_id": "domain-58010aa2e451"
}{
"labels": [
"2022-06-21T03:13:00.000Z",
"2022-06-21T03:18:00.000Z",
"2022-06-21T03:23:00.000Z",
"2022-06-21T03:28:00.000Z",
"2022-06-21T03:33:00.000Z",
"2022-06-21T03:38:00.000Z",
"2022-06-21T03:43:00.000Z",
"2022-06-21T03:48:00.000Z",
"2022-06-21T03:53:00.000Z",
"2022-06-21T03:58:00.000Z",
"2022-06-21T04:03:00.000Z",
"2022-06-21T04:08:00.000Z"
],
"resource_values": {
"cloud-svc-cd0105d255da": [
0.099999999999999,
0.10001852366397981,
0.10001852366397981,
0.1328230362675432,
0.099472075576548,
0.06507936507936621,
0.166703713994628,
0.1338983050847476,
0.1327868852458988,
0.1339168287487284,
0.1328610417160508,
0.10056497175141618
]
},
"domain_id": "domain-58010aa2e451"
}Message
MetricDataInfo
Field
Type
Description
MetricDataRequest
Field
Type
Required
Description
data_source_id
string
✔
metric
string
✔
start
string
✔
end
string
✔
stat
string
✘
domain_id
string
✔
MetricInfo
Field
Type
Description
MetricRequest
Field
Type
Required
Description
data_source_id
string
✔
resources
list of string
✔
domain_id
string
✔
MetricsInfo
Field
Type
Description
Last updated
Was this helpful?