All Products
Search
Document Center

Network Intelligence Service:GetNisNetworkMetrics

Last Updated:Feb 02, 2026

Retrieves detailed metric trend data for a specified Network Intelligence Service (NIS) network analysis scenario. The data includes metric trends for traffic analysis and performance monitoring.

Operation description

Data synchronization

  • API data is synchronized every 6 hours. The latest network analysis data is available for query after a delay of up to 6 hours.

Supported analysis scenarios:

  • Internet performance monitoring scenario

  • Cross-zone private network performance monitoring scenario

  • Cross-region private network performance monitoring scenario

Internet performance monitoring scenario

Note: The maximum time range for a query is 24 hours. If you do not specify a time range, data from the last hour is queried by default. The system returns one data entry per minute.

Note:

Request parameters

NameTypeRequiredDescription
RegionNostringYesThe Alibaba Cloud region where the monitoring node is located.
ResourceTypestringYesSet the value to InternetProbing. This queries the trends of Internet performance monitoring.
MetricNamestringYesThe metric for which you want to query trends. Set the value to rtt. This indicates the round-trip time (RT) of the probe.
Dimensionsobject[]YesThe filter conditions.
-NamestringYesThe filter condition. 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 configure at least one of these parameters.










-ValuestringYesThe value of the filter condition. Examples:
- Country: China
- Province: Zhejiang
- Isp: Alibaba
Note: The country and province names must start with an uppercase letter. The ISP parameter must be the same as the display name in the console.










Response parameters

NameTypeDescription
RequestIdstringThe request ID.
DataobjectThe object that contains the trend data of cloud network metrics.
MetricsarrayA collection of metric trend data.
-TimeStamplongThe timestamp in milliseconds.
-ValuedoubleThe value of the metric specified by the MetricName request parameter.
UnitStringThe unit of Value.

Cross-region private network performance monitoring scenario

Note:

  • If the query time range is longer than 5 days, one data entry is returned per day.

  • If the query time range is longer than 1 day and up to 5 days, one data entry is returned per hour.

  • If the query time range is 1 day or shorter, one data entry is returned every 5 minutes.

Request parameters

NameTypeRequiredDescription
RegionNostringYesThe Alibaba Cloud region.
ResourceTypestringYesSet the value to IntranetProbing. This queries the trends of cross-zone performance monitoring.
MetricNamestringYesThe metric for which you want to query trends. Set the value to rtt. This indicates the RT of the probe.
Dimensionsobject[]YesThe filter conditions.
-NamestringYesThe filter condition. Valid values:
- SourceZone: The source zone of the probe. This parameter is required.
- DestinationZone: The destination zone of the probe. This parameter is required.




-ValuestringYesThe value of the filter condition. Examples:
- SourceZone: cn-hangzhou-j
- DestinationZone: cn-hangzhou-k




Response parameters

NameTypeDescription
RequestIdstringThe request ID.
DataobjectThe object that contains the trend data of cloud network metrics.
MetricsarrayA collection of metric trend data.
-TimeStamplongThe timestamp in milliseconds.
-ValuedoubleThe value of the metric specified by the MetricName request parameter.
UnitStringThe unit of Value.

Cross-region private network performance monitoring scenario

Note

  • If the query time range exceeds 5 days, one data entry is returned per day.

  • If the query time range exceeds 1 day, one data entry is returned per hour.

  • If the query time range is less than 1 day, one data entry is returned every 5 minutes.

Request parameters

NameTypeRequiredDescription
RegionNostringYesThe Alibaba Cloud region.
ResourceTypestringYesSet the value to IntranetProbing. This queries the ranking of cross-region performance monitoring.
DirectionstringYesThe probe direction. Valid values:
- in: The probe destination is the region specified by RegionNo.
- out: The probe source is the region specified by RegionNo.




MetricNamestringYesThe metric for which you want to query trends. Set the value to rtt. This indicates the RT of the probe.
Dimensionsobject[]NoThe filter conditions.
-NamestringNoThe filter condition. Set the value to DestinationRegionNo to specify the destination region of the probe.
-ValuestringNoThe ID of the destination region. Example: DestinationRegionNo: cn-shenzhen

Response parameters

NameTypeDescription
RequestIdstringThe request ID.
DataobjectThe object that contains the trend data of cloud network metrics.
MetricsarrayA collection of metric trend data.
-TimeStamplongThe timestamp in milliseconds.
-ValuedoubleThe value of the metric specified by the MetricName request parameter.
UnitStringThe unit of Value.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

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 used for traffic forwarding. Valid values:

  • AccessInternetIpV4: All types of Alibaba Cloud public IPv4 addresses.

  • AccessInternetIpV4Limited: All types of Alibaba Cloud public IPv4 addresses that are subject to region-specific speed limits.

  • ElasticIP: Elastic IP addresses (EIPs) (IPv4).

  • PublicIpEcs: Fixed public IP addresses (IPv4) that are associated with ECS instances.

  • PublicIpClb: Fixed public IP addresses (IPv4) that are associated with CLB instances.

  • NAT: Internet traffic that passes through SNAT.

  • TR: Traffic that passes through a Cloud Enterprise Network (CEN) TransitRouter.

  • TRAttachment: Traffic that passes through a CEN connection instance. This includes intra-region and inter-region connections. Intra-region connections have both inbound and outbound directions. Inter-region connections have only an outbound direction.

  • VBR: Traffic that passes through a virtual border router (VBR).

  • GA: Traffic that passes through Global Accelerator (GA).

  • InternetProbing: Internet quality probing data.

  • IntranetProbing: Private network quality probing data.

  • NisInspectionHistoryReportScore: Historical scores of inspections.

AccessInternetIPV4

MetricName

string

Yes

The metric name. Valid values:

  • bps: Bits per second.

  • pps: Packets per second.

  • rtt: The RT when a TCP connection is established.

  • RetransmitRate: The retransmission rate.

  • RatelimitDropPps: The rate of packet loss due to speed limiting.

  • ActiveSessionCount: The number of concurrent sessions.

  • NewSessionPerSecond: The number of new sessions per second.

  • BandwidthUtilization: The bandwidth utilization.

  • passRate: The inspection pass rate.

Note

If no RT data is returned for the specified time range, it is because the connection is a persistent connection and no new connection was established during this period.

bps

Dimensions

array<object>

Yes

A collection of query parameters for the business metric. For more information about the parameters for each scenario, see GetNisNetworkMetrics.

bps

object

No

The query parameters for the business metric.

Name

string

No

The name of the filter condition.

instanceId

Value

string

No

The value of the filter condition.

eip-sample*

BeginTime

integer

No

The beginning of the time range to query. This is a UNIX timestamp in milliseconds. If you do not specify this parameter, data from the last hour is queried by default. The earliest start time you can specify is 7 days ago.

1638239092000

EndTime

integer

No

The end of the time range to query. This is a UNIX timestamp in milliseconds. If you do not specify this parameter, data from the last hour is queried by default. If you specify only BeginTime, the system queries data within one hour after the specified BeginTime. The time range between the start time and the end time cannot exceed 24 hours.

1684373700099

ScanBy

string

No

The sorting method. Default value: TimestampAscending. Valid values:

  • TimestampAscending: Sorts the results in chronological order.

  • TimestampDescending: Sorts the results in reverse chronological order.

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 RAM users that you want to explicitly specify.

string

No

A list of member account IDs.

118639953821****

StepMinutes

integer

No

Response elements

Element

Type

Description

Example

object

RpcResponse<ArrayList<PublicFlowLogMetricModel>>

RequestId

string

The request ID.

D5E98683-355B-5867-8D3D-A24755F6895B

Data

object

The object that contains the trend data of cloud network metrics.

Unit

string

The unit of the metric.

Bits/Second

Metrics

array<object>

A collection of metric trend data.

object

The metric trend data at a specific point in time.

TimeStamp

integer

The timestamp of the data entry in milliseconds.

1690684091100

Value

number

The metric value.

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.
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.