GetNisNetworkMetrics
Retrieves detailed trend data on monitoring metrics for a specified Network Intelligence Service (NIS) network analysis scenario. This includes trends for traffic metrics in traffic analysis scenarios and for performance metrics in performance monitoring scenarios.
Operation description
Notes on data synchronization:
API data is synchronized every six hours. Data available for querying is delayed by six hours.
Supported analysis scenarios:
Internet performance monitoring
Cross-zone intranet performance monitoring
Cross-region intranet performance monitoring
Internet performance monitoring
Note
The maximum time range for a query is 24 hours. If you do not specify a time range, the system queries data from the last hour by default. The system returns one data point per minute.
Request parameters
| Parameter | Type | Required | Description |
| RegionNo | string | Yes | The Alibaba Cloud region of the probe source. |
| ResourceType | string | Yes | Set to InternetProbing to query trend data for Internet performance monitoring. |
| MetricName | string | Yes | The metric to query. Set to rtt for the probe's round-trip time. |
| Dimensions | object[] | Yes | The filter conditions. |
| -Name | string | Yes | The filter key. Valid values: - Country: The country where the probe is located. - Province: The province where the probe is located. - ISP: The ISP of the probe. Note: You must specify at least one of these parameters. |
| -Value | string | Yes | The value for the filter key. Examples: - Country: China - Province: Zhejiang - ISP: Alibaba Note: The values for Country and Province must start with an uppercase letter. The value for ISP must match its display name in the console. |
Response parameters
| Parameter | Type | Description |
| RequestId | string | The request ID. |
| Data | object | An object that contains the trend data for cloud network metrics. |
| Metrics | array | An array of metric trend data points. |
| -TimeStamp | long | The timestamp, in milliseconds. |
| -Value | double | The value of the metric specified by MetricName. |
| Unit | string | The unit for Value. |
Cross-zone intranet performance monitoring
Note
-
If the query time range is longer than five days, one data point is returned per day.
-
If the query time range is longer than one day but no more than five days, one data point is returned per hour.
-
If the query time range is one day or shorter, one data point is returned every five minutes.
Request parameters
| Parameter | Type | Required | Description |
| RegionNo | string | Yes | The ID of the Alibaba Cloud region. |
| ResourceType | string | Yes | Set to IntranetProbing to query trend data for cross-zone performance monitoring. |
| MetricName | string | Yes | The metric to query. Set to rtt for the probe's round-trip time. |
| Dimensions | object[] | Yes | The filter conditions. |
| -Name | string | Yes | The filter key. Valid values: - SourceZone: The source zone for the probe. - DestinationZone: The destination zone for the probe. |
| -Value | string | Yes | The value for the filter key. Examples: - SourceZone: cn-hangzhou-j - DestinationZone: cn-hangzhou-k |
Response parameters
| Parameter | Type | Description |
| RequestId | string | The request ID. |
| Data | object | An object that contains the trend data for cloud network metrics. |
| Metrics | array | An array of metric trend data points. |
| -TimeStamp | long | The timestamp, in milliseconds. |
| -Value | double | The value of the metric specified by MetricName. |
| Unit | string | The unit for Value. |
Cross-region intranet performance monitoring
Note
-
If the query time range is longer than five days, one data point is returned per day.
-
If the query time range is longer than one day but no more than five days, one data point is returned per hour.
-
If the query time range is one day or shorter, one data point is returned every five minutes.
Request parameters
| Parameter | Type | Required | Description |
| RegionNo | string | Yes | The ID of the Alibaba Cloud region. |
| ResourceType | string | Yes | Set to IntranetProbing to query cross-region performance monitoring rankings. |
| Direction | string | Yes | The probe direction. Valid values: - in: The probe destination is the region specified by the RegionNo parameter. - out: The probe source is the region specified by the RegionNo parameter. |
| MetricName | string | Yes | The metric to query. Set to rtt for the probe's round-trip time. |
| Dimensions | object[] | No | The filter conditions. |
| -Name | string | No | The filter key. Valid value: DestinationRegionNo, which specifies the destination region of the probe. |
| -Value | string | No | The ID of the destination region. Example: cn-shenzhen |
Response parameters
| Parameter | Type | Description |
| RequestId | string | The request ID. |
| Data | object | An object that contains the trend data for cloud network metrics. |
| Metrics | array | An array of metric trend data points. |
| -TimeStamp | long | The timestamp, in milliseconds. |
| -Value | double | The value of the metric specified by MetricName. |
| Unit | string | The unit for Value. |
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
nis:GetNisNetworkMetrics |
none |
*All Resource
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| RegionNo |
string |
Yes |
The region ID. |
cn-shenzhen |
| ResourceType |
string |
Yes |
The type of Alibaba Cloud network resource that forwards traffic. Valid values:
|
AccessInternetIPV4 |
| MetricName |
string |
Yes |
The metric name. Valid values:
Note
If no RTT data is available for the specified time range, it indicates a persistent connection and no new connection was established during this period. |
bps |
| Dimensions |
array<object> |
Yes |
An array of metric dimensions. For details on parameters in different scenarios, see GetNisNetworkMetrics. |
bps |
|
object |
No |
A metric dimension. |
||
| Name |
string |
No |
The name of the dimension. |
instanceId |
| Value |
string |
No |
The value of the dimension. |
eip-sample* |
| BeginTime |
integer |
No |
The start of the time range to query. This value is a Unix timestamp in ms. If you do not specify this parameter, data from the last hour is queried. The earliest start time that you can specify is 7 days ago. |
1638239092000 |
| EndTime |
integer |
No |
The end of the time range to query. This value is a Unix timestamp in ms. If you specify only |
1684373700099 |
| ScanBy |
string |
No |
The sort order for the returned data points. Default value: TimestampAscending. Valid values:
|
TimestampAscending |
| UseCrossAccount |
boolean |
No |
Specifies whether to use the multi-account access mode. This parameter is reserved and not supported. |
false |
| AccountIds |
array |
No |
The IDs of member accounts to query. |
|
|
string |
No |
A member account ID. |
118639953821**** |
|
| StepMinutes |
integer |
No |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
RpcResponse<ArrayList |
||
| RequestId |
string |
The request ID. |
D5E98683-355B-5867-8D3D-A24755F6895B |
| Data |
object |
The trend data for cloud network metrics. |
|
| Unit |
string |
The unit of the metric. |
Bits/Second |
| Metrics |
array<object> |
The metric trend data. |
|
|
object |
A data point in the time series. |
||
| TimeStamp |
integer |
The timestamp of the data point. Unit: milliseconds. |
1690684091100 |
| Value |
number |
The value of the metric. |
88 |
Examples
Success response
JSON format
{
"RequestId": "D5E98683-355B-5867-8D3D-A24755F6895B",
"Data": {
"Unit": "Bits/Second",
"Metrics": [
{
"TimeStamp": 1690684091100,
"Value": 88
}
]
}
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | IllegalParam.BeginTimeAndEndTime | It only supports querying data for up to 24 hours: %s. | The time range that you can query must be no longer than 24 hours. |
| 400 | OperationFailed.DataTooMuch | Too much data has been queried under the specified conditions. Shorten the query time, specify more precise filtering conditions, or try again later. | Too much data has been queried under the specified conditions. Shorten the query time, specify more precise filtering conditions, or try again later. |
| 400 | IllegalParam.Dimensions | The specified Dimensions(%s) is illegal. | The specified Dimensions parameter is illegal. |
| 400 | IllegalParam.Dimensions.Direction | The specified Dimensions.Direction(%s) is illegal. | The specified Dimensions.Direction parameter is illegal. |
| 400 | IllegalParam.Dimensions.InstanceId | The specified Dimensions.InstanceId(%s) is illegal. | The specified Dimensions.InstanceId parameter is illegal. |
| 400 | IllegalParam.MetricName | The specified MetricName(%s) is illegal. | The specified MetricName parameter is illegal. |
| 400 | IllegalParam.ResourceType | The specified resourceType (%s) is invalid. | The value of ResourceType is invalid. |
| 400 | IllegalParam.Dimensions.DestinationZone | The specified parameter Dimensions.DestinationZone (%s) is illegal. | |
| 400 | IllegalParam.Dimensions.SourceZone | The specified parameter Dimensions.SourceZone(%s) is illegal. | |
| 400 | IllegalParam.IP | The specified IP address (%s) is invalid. | The specified IP address (%s) is invalid. |
| 400 | IllegalParam.RegionNo | The specified parameter RegionNo(%s) is illegal. | The specified argument RegionNo(%s) is illegal. |
| 400 | IllegalParam.Dimensions.InspectionTaskId | The specified argument Dimensions.InspectionTaskId(%s) is illegal. | The specified argument Dimensions.InspectionTaskId(%s) is illegal. |
| 400 | IllegalParam.Dimensions.DestinationRegionNo | The specified parameter Dimensions.DestinationRegionNo(%s) is illegal. | The specified Dimensions.DestinationRegionNo(%s) parameter is illegal. |
| 400 | IllegalParam.StepMinutes | The specified StepMinutes parameter value is illegal, only %s minutes of data precision is supported. | The specified StepMinutes parameter value is illegal, only %s minutes of data precision is supported. |
| 400 | IllegalParam.MaxTimeScope | The query time range exceeds the limit. You can query up to %s days of data. | The query time range exceeds the limit. You can query up to% s days of data. |
| 400 | IllegalParam.StepMinutesAndTime | In the current query time range, data precision of only %s minutes is supported to ensure performance. | In the current query time range, data precision of only %s minutes is supported to ensure performance. |
| 400 | UnsupportedRegion | This feature is not supported in the current region. | |
| 400 | IllegalParam.SourceRegions | SourceRegions Can be wrong. | The Region parameter is incorrect. Please confirm whether the number of regions entered is incorrect (> 1), or the wrong RegionId is entered |
| 404 | ResourceNotFound.InstanceId | The specified InstanceId(%s) does not exist. | The specified InstanceId does not exist. |
| 404 | ResourceNotFound.IpSets | The specified instance does not exist or does not have any acceleration region. | The specified instance does not exist or does not have any acceleration region. |
| 404 | ResourceNotFound.InspectionTaskId | The specified InspectionTaskId(%s) is not found. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.