AWS Site-to-Site VPN
Collect AWS Site-to-Site VPN connection assets, tunnel state, and traffic metrics.
Configuration¶
Install Func¶
We recommend enabling Hosted Func under Guance Integrations - Extensions. All prerequisites are installed automatically; continue with script installation.
For a self-hosted Func deployment, see Self-host Func.
Activate Script¶
Note: Prepare an AWS AK that meets the requirements. For simplicity, you can grant the global read-only permission
ReadOnlyAccessdirectly.
Activate the script in Hosted Func¶
- Log in to the Guance console
- Click the 【Integration】 menu and select 【Cloud Account Management】
- Click 【Add Cloud Account】, select 【AWS】, and fill in the required information on the interface. If you have already configured the cloud account information before, ignore this step
- Click 【Test】, and if the test is successful, click 【Save】. If the test fails, please check if the relevant configuration information is correct and test again
- Click 【Cloud Account Management】, and you can see the added cloud account in the list. Click the corresponding cloud account to enter the details page
- Click [Integrations] on the cloud account details page. Find
AWS Site-to-Site VPNin theNot installedlist and click [Install] to open the installation dialog. Select the VPN region in use and install.
Activate the script manually¶
- Sign in to the Func console, click [Script Market], open the Guance script market, and search for
integration_aws_vpn. - Click 【Install】 and enter AWS AK ID, AK Secret, and the account name.
- Click [Deploy Startup Script]. The system automatically creates the
Startupscript set and configures the corresponding startup script. Setregionsto the VPN regions in use, separated by ASCII commas, and setcloudwatch_configs['targets'][0]['metrics']to['TunnelDataIn', 'TunnelDataOut', 'TunnelState']. - after enabling it, open"Management / Automatic Trigger Configuration"to view the automatic trigger configuration.Click[Run],to run it immediately,without waiting for the scheduled interval.wait a moment,you can view execution records and related logs
Verification¶
- In"Management / Automatic Trigger Configuration"confirm that the automatic trigger configuration exists for the task,and review task records and logs for exceptions
- In Guance, check that
aws_vpn_connectionasset information exists under [Infrastructure / Custom]. - In Guance, check the
aws_vpnmeasurement under [Metrics] for the monitoring data.
Metrics¶
After configuring AWS cloud monitoring, the default metrics are listed below. You can configure additional metrics for collection.AWS cloud monitoring metric details
AWS Site-to-Site VPN metrics are in the aws_vpn measurement.
tunnel_ip_address appears only in tunnel-level metrics; connection-level metrics are distinguished by vpn_id.
| MetricName | MetricDescribe | Dimensions | Unit |
|---|---|---|---|
tunnel_data_in_sum |
Bytes received through the VPN tunnel from the customer gateway into AWS, after decryption | vpn_id, tunnel_ip_address, region_id | B |
tunnel_data_out_sum |
Bytes sent through the VPN tunnel from AWS to the customer gateway, before encryption | vpn_id, tunnel_ip_address, region_id | B |
tunnel_state_average |
Average VPN tunnel state: 0 means unavailable, 1 means available, and intermediate values mean some tunnels are unavailable | vpn_id, tunnel_ip_address, region_id | - |
tunnel_state_minimum |
Minimum VPN tunnel state: 0 means an unavailable state occurred during the statistics period | vpn_id, tunnel_ip_address, region_id | - |