GetNisNetworkMetrics

Updated at:

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

ParameterTypeRequiredDescription
RegionNostringYesThe Alibaba Cloud region of the probe source.
ResourceTypestringYesSet to InternetProbing to query trend data for Internet performance monitoring.
MetricNamestringYesThe metric to query. Set to rtt for the probe's round-trip time.
Dimensionsobject[]YesThe filter conditions.
-NamestringYesThe 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.



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

ParameterTypeDescription
RequestIdstringThe request ID.
DataobjectAn object that contains the trend data for cloud network metrics.
MetricsarrayAn array of metric trend data points.
-TimeStamplongThe timestamp, in milliseconds.
-ValuedoubleThe value of the metric specified by MetricName.
UnitstringThe 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

ParameterTypeRequiredDescription
RegionNostringYesThe ID of the Alibaba Cloud region.
ResourceTypestringYesSet to IntranetProbing to query trend data for cross-zone performance monitoring.
MetricNamestringYesThe metric to query. Set to rtt for the probe's round-trip time.
Dimensionsobject[]YesThe filter conditions.
-NamestringYesThe filter key. Valid values:
- SourceZone: The source zone for the probe.
- DestinationZone: The destination zone for the probe.

-ValuestringYesThe value for the filter key. Examples:
- SourceZone: cn-hangzhou-j
- DestinationZone: cn-hangzhou-k

Response parameters

ParameterTypeDescription
RequestIdstringThe request ID.
DataobjectAn object that contains the trend data for cloud network metrics.
MetricsarrayAn array of metric trend data points.
-TimeStamplongThe timestamp, in milliseconds.
-ValuedoubleThe value of the metric specified by MetricName.
UnitstringThe 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

ParameterTypeRequiredDescription
RegionNostringYesThe ID of the Alibaba Cloud region.
ResourceTypestringYesSet to IntranetProbing to query cross-region performance monitoring rankings.
DirectionstringYesThe 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.

MetricNamestringYesThe metric to query. Set to rtt for the probe's round-trip time.
Dimensionsobject[]NoThe filter conditions.
-NamestringNoThe filter key. Valid value: DestinationRegionNo, which specifies the destination region of the probe.
-ValuestringNoThe ID of the destination region. Example: cn-shenzhen

Response parameters

ParameterTypeDescription
RequestIdstringThe request ID.
DataobjectAn object that contains the trend data for cloud network metrics.
MetricsarrayAn array of metric trend data points.
-TimeStamplongThe timestamp, in milliseconds.
-ValuedoubleThe value of the metric specified by MetricName.
UnitstringThe unit for 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 that forwards traffic. Valid values:

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

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

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

  • PublicIpEcs: Fixed public IP addresses (IPv4) for ECS instances.

  • PublicIpClb: Fixed public IP addresses (IPv4) for CLB instances.

  • NAT: Internet traffic that passes through a NAT gateway via SNAT.

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

  • TRAttachment: Traffic that passes through a CEN connection. This includes intra-region and inter-region connections. Intra-region connections support both inbound and outbound traffic. Inter-region connections support only outbound traffic.

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

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

  • InternetProbing: Data from Internet probing.

  • IntranetProbing: Data from intranet probing.

  • NisInspectionHistoryReportScore: Historical inspection scores.

AccessInternetIPV4

MetricName

string

Yes

The metric name. Valid values:

  • bps: Bits per second.

  • pps: Packets per second.

  • rtt: The round-trip time (RTT) for TCP connection establishment.

  • RetransmitRate: The retransmission rate.

  • RatelimitDropPps: The rate of packet loss due to bandwidth limits.

  • ActiveSessionCount: Concurrent sessions.

  • NewSessionPerSecond: New sessions per second.

  • BandwidthUtilization: Bandwidth utilization.

  • passRate: Inspection pass rate.

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 BeginTime, data for the one-hour period after the specified BeginTime is queried. The time between the start time and the end time cannot exceed 24 hours.

1684373700099

ScanBy

string

No

The sort order for the returned data points. 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 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.