Volcengine NAT
Collect Volcengine NAT Metrics
Configuration¶
Permissions¶
We recommend granting the global read-only policy ReadOnlyAccess, or configuring the permissions required by this integration as listed below.
natgateway:DescribeNatGateways: Get NAT gateway information.volc_observe:GetMetricData: Read cloud monitoring metric data through theGetMetricDataAPI.
Install Func¶
It is recommended to activate the Guance Integration - Extensions - DataFlux Func (Automata): All prerequisites are automatically installed, please proceed with the script installation.
If you are deploying Func manually, refer to Manual Deployment of Func
Install Script¶
Prepare Volcengine AK in advance and authorize access as described in Permissions.
-
Log in to the Func console, click on 【Script Market】, enter the Guance Script Market, and search for:
integration_volcengine_nat -
After clicking 【Install】, enter the corresponding parameters: Volcengine AK ID, AK Secret, and account name.
-
Click 【Deploy Startup Script】, the system will automatically create the
Startupscript set and configure the corresponding startup scripts. -
After enabling, you can see the corresponding automatic trigger configuration in 「Manage / Automatic Trigger Configuration」. Click 【Execute】 to immediately execute it once without waiting for the scheduled time. Wait for a moment, and you can check the execution task records and corresponding logs.
Verification¶
- In 「Manage / Automatic Trigger Configuration」, confirm whether the corresponding task has the automatic trigger configuration, and check the task records and logs for any exceptions.
- In Guance, check if asset information exists in 「Infrastructure - Resource Catalog」.
- In Guance, check if there are corresponding monitoring data in 「Metrics」.
Metrics¶
After configuring Volcengine-NAT, the default Measurement is as follows. You can collect more metrics through configuration Volcengine Cloud Monitoring Metrics Details
The Volcengine Measurement is under volcengine_VCM_NAT, and the following are the relevant metric descriptions
MetricName |
Subnamespace |
Metric Name | MetricUnit | Dimension |
|---|---|---|---|---|
client_conns |
client |
SNAT Concurrent Connections | Count | ResourceID,ClientIP |
client_cps |
client |
SNAT New Connections Per Second | Count/Second | ResourceID,Node |
client_out_bps |
client |
SNAT Outbound Bandwidth | Bits/Second(SI) | ResourceID,Node |
client_in_bps |
client |
SNAT Inbound Bandwidth | Bits/Second(SI) | ResourceID,Node |
client_out_bps_peak |
client |
SNAT Outbound Bandwidth Peak | Bits/Second(SI) | ResourceID,Node |
client_in_bps_peak |
client |
SNAT Inbound Bandwidth Peak | Bits/Second(SI) | ResourceID,Node |
cur_con_num |
natgateway |
Concurrent Connections | Count | ResourceID |
cps |
natgateway |
New Connections Per Second | Count/Second | ResourceID |
cur_con_drop_num |
natgateway |
Concurrent Dropped Connections Rate | Count/Second | ResourceID |
con_drop_per_sec |
natgateway |
New Dropped Connections Rate | Count/Second | ResourceID |
max_con_use_percent |
natgateway |
Connection Usage Rate | Percent | ResourceID |
out_bytes |
natgateway |
Outbound Traffic | Bytes(SI) | ResourceID |
out_bps |
natgateway |
Outbound Bandwidth | Bits/Second(SI) | ResourceID |
out_packets |
natgateway |
Outbound Packets | Count | ResourceID |
out_pps |
natgateway |
Outbound Packet Rate | Packet/Second | ResourceID |
in_bytes |
natgateway |
Inbound Traffic | Bytes(SI) | ResourceID |
in_bps |
natgateway |
Inbound Bandwidth | Bits/Second(SI) | ResourceID |
in_packets |
natgateway |
Inbound Packets | Count | ResourceID |
in_pps |
natgateway |
Inbound Packet Rate | Packet/Second | ResourceID |
error_port_allocation_count |
natgateway |
Port Allocation Failures | Count | ResourceID |
in_schedule_bps |
natgateway |
Inbound Scheduled Bandwidth | Bits/Second(SI) | ResourceID |
out_schedule_bps |
natgateway |
Outbound Scheduled Bandwidth | Bits/Second(SI) | ResourceID |
in_packets_drop |
natgateway |
Inbound Rate Limit Dropped Packets | Count | ResourceID |
out_packets_drop |
natgateway |
Outbound Rate Limit Dropped Packets | Count | ResourceID |
Object¶
The collected Volcengine NAT object data structure can be seen in 「Infrastructure - Resource Catalog」
{
"fields": {
"CreationTime": "2024-04-08T14:01:10+08:00",
"EipAddresses": "[NAT Gateway Bound Public IP Information]",
"DnatEntryIds": "{DNAT Rule ID List}",
"ExpiredTime": "",
"Description": "",
"SnatEntryIds": "{SNAT Rule ID List}",
"message": "{Instance JSON Data}"
},
"measurement": "volcengine_nat",
"tags": {
"BillingType": "2",
"BusinessStatus": "Normal",
"EipAddresses": "{NAT Gateway Bound Public IP Information}",
"NatGatewayId": "ngw-xxx",
"NatGatewayName": "xxx",
"NetworkInterfaceId": "eni-xxx",
"ProjectName": "default",
"RegionId": "cn-shanghai",
"Spec": "Small",
"Status": "Available",
"SubnetId": "subnet-xxx",
"VpcId": "vpc-xxx",
"ZoneId": "cn-shanghai-a",
"name": "ngw-xxx"
}
}
Note: The fields in
tags,fieldsmay change with subsequent updatesNote:
tags.nameis the instance ID, which serves as the unique identifier.fields.message,fields.EipAddresses,fields.DnatEntryIds,fields.SnatEntryIdsare all JSON serialized strings.