支持指定NIS网络分析场景,获取详细监控指标趋势数据,包括流量分析场景下的流量指标趋势数据,以及性能观测场景下的性能指标趋势数据等。
接口说明
数据查询结果同步说明:
API 数据跨度 6 小时同步一次,6 小时后才可查询当前网络分析数据。
支持分析场景:
公网性能观测大盘场景
跨可用区内网性能观测大盘场景
跨地域内网性能观测大盘场景
公网性能观测大盘场景
说明
支持最大查询时间跨度为 24 小时,不指定时默认查询最近 1 小时,查询的数据结果为 1 分钟 1 条。
请求参数
| 名称 | 类型 | 必填 | 描述 |
| RegionNo | string | 是 | 探测源所在阿里云地域。 |
| ResourceType | string | 是 | 固定选择 InternetProbing,表示查询公网性能监控趋势。 |
| MetricName | string | 是 | 指定查询趋势的指标,取值:rtt,探测的往返延迟。 |
| Dimensions | object[] | 是 | 过滤信息。 |
| -Name | string | 是 | 过滤条件,取值: - Country:探测的国家。 - Province:探测的省份 - Isp:探测的运营商。 说明: 以上参数至少配置其中一个。 |
| -Value | string | 是 | 过滤条件对应的过滤值,示例如下: - Country:China - Province:Zhejiang - Isp:阿里巴巴 说明: 国家,省份格式为首字母大写,运营商参数与控制台显示名称一致即可。 |
返回参数
| 名称 | 类型 | 描述 |
| RequestId | string | 请求 ID。 |
| Data | object | 云网络指标趋势数据对象 |
| Metrics | array | 指标趋势数据集合 |
| -TimeStamp | long | 毫秒时间戳。 |
| -Value | double | 入参 MetricName 对应的指标值。 |
| Unit | String | 表示 Value 的单位。 |
跨可用区内网性能观测大盘场景
说明
-
查询时间长度超过 5 天时,查询数据结果为 1 天 1 条。
-
查询时间长度超过 1 天时,查询数据结果为 1 小时 1 条。
-
查询时间长度小于 1 天时,查询数据结果为 5 分钟 1 条。
请求参数
| 名称 | 类型 | 必填 | 描述 |
| RegionNo | string | 是 | 阿里云地域。 |
| ResourceType | string | 是 | 固定选择 IntranetProbing,表示查询跨可用区性能监控趋势。 |
| MetricName | string | 是 | 指定查询趋势的指标,取值:rtt,探测的往返延迟。 |
| Dimensions | object[] | 是 | 过滤信息。 |
| -Name | string | 是 | 过滤条件,取值: - SourceZone:探测的源可用区,必须指定。 - DestinationZone:探测的目的可用区,必须指定。 |
| -Value | string | 是 | 过滤条件对应的过滤值,示例如下: - SourceZone:cn-hangzhou-j - DestinationZone:cn-hangzhou-k |
返回参数
| 名称 | 类型 | 描述 |
| RequestId | string | 请求 ID。 |
| Data | object | 云网络指标趋势数据对象 |
| Metrics | array | 指标趋势数据集合 |
| -TimeStamp | long | 毫秒时间戳。 |
| -Value | double | 入参 MetricName 对应的指标值。 |
| Unit | String | 表示 Value 的单位。 |
跨地域内网性能观测大盘场景
说明
-
查询时间长度超过 5 天时,查询数据结果为 1 天 1 条。
-
查询时间长度超过 1 天时,查询数据结果为 1 小时 1 条。
-
查询时间长度小于 1 天时,查询数据结果为 5 分钟 1 条。
请求参数
| 名称 | 类型 | 必填 | 描述 |
| RegionNo | string | 是 | 阿里云地域。 |
| ResourceType | string | 是 | 固定选择 IntranetProbing,表示查询跨地域性能观测排名。 |
| Direction | string | 是 | 探测方向,取值: - in:以 RegionNo 为目的的探测。 - out:以 RegionNo 为源的探测。 |
| MetricName | string | 是 | 指定查询趋势的指标,取值:rtt,探测的往返延迟。 |
| Dimensions | object[] | 否 | 过滤信息。 |
| -Name | string | 否 | 过滤条件,取值:DestinationRegionNo,探测的目的地域,该参数必须指定。 |
| -Value | string | 否 | 目的地域 ID,示例如下: DestinationRegionNo:cn-shenzhen |
返回参数
| 名称 | 类型 | 描述 |
| RequestId | string | 请求 ID。 |
| Data | object | 云网络指标趋势数据对象 |
| Metrics | array | 指标趋势数据集合 |
| -TimeStamp | long | 毫秒时间戳。 |
| -Value | double | 入参 MetricName 对应的指标值。 |
| Unit | String | 表示 Value 的单位。 |
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
调试
授权信息
|
操作 |
访问级别 |
资源类型 |
条件关键字 |
关联操作 |
|
nis:GetNisNetworkMetrics |
none |
*全部资源
|
无 | 无 |
请求参数
|
名称 |
类型 |
必填 |
描述 |
示例值 |
| RegionNo |
string |
是 |
地域 ID。 |
cn-shenzhen |
| ResourceType |
string |
是 |
按流量转发所使用的阿里云网络资源类型进行分析,取值:
|
AccessInternetIPV4 |
| MetricName |
string |
是 |
指标名。取值:
说明
选定时间范围内 RTT 无数据,是因为该时间段里,此连接是长连接,没有触发首次建连。 |
bps |
| Dimensions |
array<object> |
是 |
具体业务的 Metric 查询参数集合。各场景参数说明,请参见 GetNisNetworkMetrics 。 |
bps |
|
object |
否 |
具体业务的 Metric 查询参数。 |
||
| Name |
string |
否 |
过滤条件的名字。 |
instanceId |
| Value |
string |
否 |
过滤条件的值。 |
eip-sample* |
| BeginTime |
integer |
否 |
起始时间,单位 ms,格式 unix 时间戳。未指定时默认查最近 1 小时。起始时间最早可选择 7 天前。 |
1638239092000 |
| EndTime |
integer |
否 |
结束时间,单位 ms,格式 unix 时间戳。未指定时默认查最近 1 小时。只指定了 BeginTime 时查 BeginTime 之后的一小时。结束时间距起始时间最多 24 小时。 |
1684373700099 |
| ScanBy |
string |
否 |
排序方式,默认 TimestampAscending,取值:
|
TimestampAscending |
| UseCrossAccount |
boolean |
否 |
是否使用多账号访问模式,保留参数,暂不支持。 |
false |
| AccountIds |
array |
否 |
显式传递子账号 ID。 |
|
|
string |
否 |
成员账号 ID 列表。 |
118639953821**** |
|
| StepMinutes |
integer |
否 |
返回参数
|
名称 |
类型 |
描述 |
示例值 |
|
object |
RpcResponse<ArrayList |
||
| RequestId |
string |
请求 ID。 |
D5E98683-355B-5867-8D3D-A24755F6895B |
| Data |
object |
云网络指标趋势数据对象。 |
|
| Unit |
string |
单位。 |
Bits/Second |
| Metrics |
array<object> |
指标趋势数据集合。 |
|
|
object |
指标趋势单时间点数据。 |
||
| TimeStamp |
integer |
数据的毫秒时间戳。 |
1690684091100 |
| Value |
number |
指标值。 |
88 |
示例
正常返回示例
JSON格式
{
"RequestId": "D5E98683-355B-5867-8D3D-A24755F6895B",
"Data": {
"Unit": "Bits/Second",
"Metrics": [
{
"TimeStamp": 1690684091100,
"Value": 88
}
]
}
}
错误码
|
HTTP status code |
错误码 |
错误信息 |
描述 |
|---|---|---|---|
| 400 | IllegalParam.BeginTimeAndEndTime | It only supports querying data for up to 24 hours: %s. | 最大支持查询24小时数据。 |
| 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. | 指定条件下查询的数据过多,请缩短查询时间、指定更精确过滤条件或者稍后重试。 |
| 400 | IllegalParam.Dimensions | The specified Dimensions(%s) is illegal. | 指定的Dimensions(%s)参数不合法。 |
| 400 | IllegalParam.Dimensions.Direction | The specified Dimensions.Direction(%s) is illegal. | 指定的Dimensions.Direction(%s)参数不合法。 |
| 400 | IllegalParam.Dimensions.InstanceId | The specified Dimensions.InstanceId(%s) is illegal. | 指定的Dimensions.InstanceId(%s)参数不合法。 |
| 400 | IllegalParam.MetricName | The specified MetricName(%s) is illegal. | 指定的MetricName(%s)参数不合法。 |
| 400 | IllegalParam.ResourceType | The specified resourceType (%s) is invalid. | 指定的ResourceType变量值(%s)不存在。 |
| 400 | IllegalParam.Dimensions.DestinationZone | The specified parameter Dimensions.DestinationZone (%s) is illegal. | 指定的参数Dimensions.DestinationZone(%s)不合法。 |
| 400 | IllegalParam.Dimensions.SourceZone | The specified parameter Dimensions.SourceZone(%s) is illegal. | 指定的参数Dimensions.SourceZone(%s)不合法。 |
| 400 | IllegalParam.IP | The specified IP address (%s) is invalid. | 指定的IP地址(%s)无效。 |
| 400 | IllegalParam.RegionNo | The specified parameter RegionNo(%s) is illegal. | 指定的参数RegionNo(%s)不合法。 |
| 400 | IllegalParam.Dimensions.InspectionTaskId | The specified argument Dimensions.InspectionTaskId(%s) is illegal. | 指定的参数Dimensions.InspectionTaskId(%s)不合法。 |
| 400 | IllegalParam.Dimensions.DestinationRegionNo | The specified parameter Dimensions.DestinationRegionNo(%s) is illegal. | 指定的Dimensions.DestinationRegionNo(%s)参数非法。 |
| 400 | IllegalParam.StepMinutes | The specified StepMinutes parameter value is illegal, only %s minutes of data precision is supported. | 指定的StepMinutes参数值不合法,仅支持%s分钟的数据精度。 |
| 400 | IllegalParam.MaxTimeScope | The query time range exceeds the limit. You can query up to %s days of data. | 查询时间范围超出限制,最大支持查询%s天的数据。 |
| 400 | IllegalParam.StepMinutesAndTime | In the current query time range, data precision of only %s minutes is supported to ensure performance. | 当前查询时间范围下,为保证性能,仅支持%s分钟的数据精度。 |
| 400 | UnsupportedRegion | This feature is not supported in the current region. | |
| 404 | ResourceNotFound.InstanceId | The specified InstanceId(%s) does not exist. | 指定的InstanceId(%s)不存在。 |
| 404 | ResourceNotFound.IpSets | The specified instance does not exist or does not have any acceleration region. | 指定的实例不存在或者没有加速区域。 |
| 404 | ResourceNotFound.InspectionTaskId | The specified InspectionTaskId(%s) is not found. | 指定的InspectionTaskId(%s)不存在。 |
访问错误中心查看更多错误码。
变更历史
更多信息,参考变更详情。