Get Time Series Data
Get timeseries metrics data for a given resource_type and resource_id. (use /key-info API to check which keys have 'is_time_series' as 'true') It can be used to fetch raw metrics and aggregated metrics for metrics keys. A distinct metric is defined by combination of resource_type + site_id + node_id + resource_id + obj_id + metric_key. Only a few metric keys support query time aggregation (use /key-info API to check which keys have aggregate_by_resource_ids set to 'true').
Metrics data request body, contains list of NSX Resource Intent Paths or UUIDS (for NSX objects without intents), resource type, time interval etc.
{
"granularity": "string",
"start_time": 0,
"end_time": 0,
"keys": [
"string"
],
"resource_type": "string",
"resource_ids": [
"string"
],
"related_metrics_request": {
"conditions": [
{
"related_resource_type": "string",
"related_resource_ids": [
"string"
],
"metrics_condition_conjunction": "string"
}
],
"metrics_condition_conjunction": "string"
},
"aggregate_resource_ids": false,
"aggregate_operation": "string",
"max_num_data_points": 0,
"object_ids": [
"string"
],
"node_ids": [
"string"
],
"site_ids": [
"string"
],
"page_number": 0,
"page_size": 0,
"filter": {
"filter_components": [
{
"filter_field": "string",
"filter_operation": "string",
"value": "string",
"metrics_key": "string"
}
],
"metrics_condition_conjunction": "string"
},
"aggregation": {
"aggregation_dimension": "string",
"aggregation_function": "string"
},
"groupby": "string",
"include_partial_intervals": false
}
OK
{
"granularity": "string",
"start_time": 0,
"end_time": 0,
"keys": [
"string"
],
"resource_type": "string",
"resource_ids": [
"string"
],
"related_metrics_request": {
"conditions": [
{
"related_resource_type": "string",
"related_resource_ids": [
"string"
],
"metrics_condition_conjunction": "string"
}
],
"metrics_condition_conjunction": "string"
},
"aggregate_resource_ids": false,
"aggregate_operation": "string",
"max_num_data_points": 0,
"object_ids": [
"string"
],
"node_ids": [
"string"
],
"site_ids": [
"string"
],
"page_number": 0,
"page_size": 0,
"filter": {
"filter_components": [
{
"filter_field": "string",
"filter_operation": "string",
"value": "string",
"metrics_key": "string"
}
],
"metrics_condition_conjunction": "string"
},
"aggregation": {
"aggregation_dimension": "string",
"aggregation_function": "string"
},
"groupby": "string",
"include_partial_intervals": false
}
Error Response
{
"error_code": 0,
"module_name": "string",
"error_message": "string"
}
HTTP Status or Application error code
Module where the error happened
Message describing the error
curl -X POST -H 'Authorization: <value>' -H 'Content-Type: application/json' -d '{"keys":["string"],"resource_type:"string"}' https://{api_host}/metrics/data