Alibaba Cloud NAT¶
Alibaba Cloud NAT Metrics display, including concurrent connections, new connections, VPC traffic, VPC packets, etc.
Configuration¶
Install Func¶
It is recommended to enable Guance Integration - Extension - DataFlux Func (Automata)
If you deploy Func yourself, refer to Self-deployed Func
Enable Script¶
Note: Please prepare an Alibaba Cloud AK that meets the requirements in advance (for simplicity, you can directly grant global read-only permission
ReadOnlyAccess
).
Script for Enabling Managed Version¶
- Log in to Guance Console
- Click on the 【Manage】 menu and select 【Cloud Account Management】
- Click 【Add Cloud Account】, choose 【Alibaba Cloud】, and fill in the required information on the interface; if cloud account information has been configured before, skip this step
- Click 【Test】, after a successful test click 【Save】; if the test fails, check whether the related configuration information is correct and retest
- In the 【Cloud Account Management】 list, you can see the added cloud account, click on the corresponding cloud account to enter the details page
- Click the 【Integration】 button on the cloud account details page, under the
Not Installed
list, findAlibaba Cloud NAT
, click the 【Install】 button, and install via the pop-up installation interface.
Manual Enablement Script¶
-
Log in to the Func Console, click 【Script Market】, enter the official script market, and search:
guance_aliyun_nat
-
After clicking 【Install】, input the corresponding parameters: Alibaba Cloud AK ID, AK Secret, and account name.
-
Click 【Deploy Startup Script】, the system will automatically create a
Startup
script set and automatically configure the corresponding startup script. -
After enabling, you can see the corresponding automatic trigger configuration in 「Management / Automatic Trigger Configuration」. Click 【Execute】 to immediately execute once without waiting for the scheduled time. Wait a moment, and you can view the execution task records and corresponding logs.
We default collect some configurations, details are shown in the metrics section.
Configure Custom Cloud Object Metrics
Verification¶
- In 「Management / Automatic Trigger Configuration」 confirm that the corresponding task exists with the appropriate automatic trigger configuration, and you can check the task records and logs to ensure there are no anomalies.
- In Guance, 「Infrastructure / Custom」 check if asset information exists.
- In Guance, 「Metrics」 check if there is corresponding monitoring data.
Metrics¶
After configuring Alibaba Cloud - Cloud Monitoring, the default metric set is as follows. You can collect more metrics through configuration. Alibaba Cloud Cloud Monitoring Metric Details
Metric Id | Metric Name | Dimensions | Statistics | Unit | Min Periods |
---|---|---|---|---|---|
BWRateInFromInside | Traffic Rate from VPC | userId,instanceId | Value | bps | 60 s |
BWRateInFromOutside | Traffic Rate from Public Network | userId,instanceId | Value | bps | 60 s |
BWRateOutToInside | Incoming VPC Traffic Rate | userId,instanceId | Value | bps | 60 s |
BWRateOutToOutside | Incoming Public Network Traffic Rate | userId,instanceId | Value | bps | 60 s |
BytesInFromInside | Traffic from VPC | userId,instanceId | Value | bytes | 60 s |
BytesInFromOutside | Traffic from Public Network | userId,instanceId | Value | bytes | 60 s |
BytesOutToInside | Incoming VPC Traffic | userId,instanceId | Value | bytes | 60 s |
BytesOutToOutside | Incoming Public Network Traffic | userId,instanceId | Value | bytes | 60 s |
DropTotalBps | Total Packet Drop Bandwidth | userId,instanceId | Value | bit/s | 60 s |
DropTotalPps | Total Packet Drop Rate | userId,instanceId | Value | countS | 60 s |
EniBytesDropRx | Interface Inbound Dropped Traffic | userId,instanceId,eniId | Value | bytes | 60 s |
EniBytesDropTx | Interface Outbound Dropped Traffic | userId,instanceId,eniId | Value | bytes | 60 s |
EniBytesRx | Interface Inbound Traffic | userId,instanceId,eniId | Value | bytes | 60 s |
EniBytesTx | Interface Outbound Traffic | userId,instanceId,eniId | Value | bytes | 60 s |
EniPacketsDropPortAllocationFail | Interface Port Allocation Failed Packet Count | userId,instanceId,eniId | Value | count | 60 s |
EniPacketsDropRx | Interface Inbound Dropped Packet Count | userId,instanceId,eniId | Value | count | 60 s |
EniPacketsDropTx | Interface Outbound Dropped Packet Count | userId,instanceId,eniId | Value | count | 60 s |
EniPacketsRx | Interface Inbound Packet Count | userId,instanceId,eniId | Value | count | 60 s |
EniPacketsTx | Interface Outbound Packet Count | userId,instanceId,eniId | Value | count | 60 s |
EniSessionActiveConnection | Interface Concurrent Connections | userId,instanceId,eniId | Value | count | 60 s |
EniSessionLimitDropConnection | Interface New Dropped Connection Rate | userId,instanceId,eniId | Value | countS | 60 s |
EniSessionNewConnection | Interface New Connection Rate | userId,instanceId,eniId | Value | countS | 60 s |
EniSessionNewLimitDropConnection | Interface Concurrent Dropped Connection Rate | userId,instanceId,eniId | Value | countS | 60 s |
ErrorPortAllocationCount | Number of Port Allocation Failures Within Interval | userId,instanceId | Value | count | 60 s |
ErrorPortAllocationRate | Rate of Port Allocation Failures Within Interval | userId,instanceId | Value | countS | 60 s |
InBpsSum | Throughput | userId,instanceId | Value | bit/s | 60 s |
PPSRateInFromInside | Packet Rate from VPC | userId,instanceId | Value | countS | 60 s |
PPSRateInFromOutside | Packet Rate from Public Network | userId,instanceId | Value | countS | 60 s |
PPSRateOutToInside | Incoming VPC Packet Rate | userId,instanceId | Value | countS | 60 s |
PPSRateOutToOutside | Incoming Public Network Packet Rate | userId,instanceId | Value | countS | 60 s |
PacketsInFromInside | Packet Volume from VPC | userId,instanceId | Value | count | 60 s |
PacketsInFromOutside | Packet Volume from Public Network | userId,instanceId | Value | count | 60 s |
PacketsOutToInside | Incoming VPC Packet Volume | userId,instanceId | Value | count | 60 s |
PacketsOutToOutside | Incoming Public Network Packet Volume | userId,instanceId | Value | count | 60 s |
SessionActiveConnection | Concurrent Connections | userId,instanceId | Value | count | 60 s |
SessionActiveConnectionWaterLever | Concurrent Connection Water Level | userId,instanceId | Value | % | 60 s |
SessionLimitDropConnection | Concurrent Dropped Connection Rate | userId,instanceId | Value | countS | 60 s |
SessionNewConnection | New Connection Rate | userId,instanceId | Value | countS | 60 s |
SessionNewConnectionWaterLever | New Connection Water Level | userId,instanceId | Value | % | 60 s |
SessionNewLimitDropConnection | New Dropped Connection Rate | userId,instanceId | Value | countS | 60 s |
Objects¶
Collected Alibaba Cloud SLB object data structure, which can be viewed from 「Infrastructure - Custom」.
{
"measurement": "aliyun_nat",
"tags": {
"name" : "ngw-bp1b3urqh0t7xxxxx",
"NatGatewayId" : "ngw-bp1b3urqh0t7xxxxx",
"instance_name" : "Operator",
"VpcId" : "vpc-bp1l3jzwhv8cnu9p8u4yh",
"Spec" : "Small",
"InstanceChargeType": "PrePaid",
"RegionId" : "cn-hangzhou",
"BusinessStatus" : "Normal"
},
"fields": {
"CreationTime": "2021-01-27T06:15:48Z",
"ExpiredTime" : "2022-04-27T16:00Z",
"message" : "{Instance JSON Data}"
}
}