Alibaba Cloud VPN
Collect Alibaba Cloud VPN monitoring data.
Configuration¶
Install Func¶
Enable Guance Integration - Extensions - Managed Func. All prerequisites are installed automatically; continue with script installation.
For a self-hosted Func deployment, see Deploy Func yourself.
Enable the script¶
Tip: Prepare the required Alibaba Cloud AK in advance (for simplicity, you can grant the global read-only permission
ReadOnlyAccess).
- Log in to the Func console, click Script Market, open the Guance script market, and search for
integration_alibabacloud_vpn - Click Install, then enter the Alibaba Cloud AK ID, AK Secret, and account name.
- Click Deploy Startup Script. The system automatically creates the
Startupscript set and configures the corresponding startup script. - Once enabled, the automatic trigger appears under Management / Automatic Trigger Configuration. Click Execute to run it immediately without waiting for the scheduled time. After a short wait, review the task records and logs.
Verification¶
- Under Management / Automatic Trigger Configuration, confirm that the task has an automatic trigger, and inspect its records and logs for errors.
- In Guance, check Infrastructure / Custom for asset information.
- In Guance, check Metrics for the corresponding monitoring data.
Metrics¶
After configuring Alibaba Cloud Monitoring, the default measurement is listed below. You can configure collection of additional metrics.
Measurement: aliyun_acs_vpn.
| MetricName | MetricDescribe | Dimensions | Unit |
|---|---|---|---|
in_bandwidth_utilization |
VPN gateway inbound bandwidth utilization | account_name, RegionId, userId, instanceId | percent |
ipsec_rxPkgs |
IPSec connection inbound packet rate | account_name, RegionId, userId, instanceId, ipsecId | pps |
ipsec_txPkgs |
IPSec connection outbound packet rate | account_name, RegionId, userId, instanceId, ipsecId | pps |
ipsec_rx_rate |
IPSec connection inbound bit rate | account_name, RegionId, userId, instanceId, ipsecId | bps |
ipsec_tx_rate |
IPSec connection outbound bit rate | account_name, RegionId, userId, instanceId, ipsecId | bps |
net_rx_Pkgs |
VPN gateway inbound packet rate | account_name, RegionId, userId, instanceId | pps |
net_tx_Pkgs |
VPN gateway outbound packet rate | account_name, RegionId, userId, instanceId | pps |
net_rx_rate |
Gateway inbound bandwidth | account_name, RegionId, userId, instanceId | bps |
net_tx_rate |
Gateway outbound bandwidth | account_name, RegionId, userId, instanceId | bps |
out_bandwidth_utilization |
VPN gateway outbound bandwidth utilization | account_name, RegionId, userId, instanceId | percent |
ssl_client_count |
SSL client connection count | account_name, RegionId, userId, instanceId | count |
tun_bgp_state |
BGP negotiation status of a VPN gateway IPSec tunnel: 0 abnormal, 1 normal | account_name, RegionId, userId, instanceId, ipsecId, tunnelId | - |
tun_rx_bps |
IPsec tunnel inbound bit rate | account_name, RegionId, userId, instanceId, ipsecId, tunnelId | bps |
tun_rx_pps |
IPsec tunnel inbound packet rate | account_name, RegionId, userId, instanceId, ipsecId, tunnelId | pps |
tun_state |
IPsec tunnel negotiation status on a dual-tunnel VPN gateway: 0 abnormal, 1 normal | account_name, RegionId, userId, instanceId, ipsecId, tunnelId | - |
tun_tx_bps |
IPsec tunnel outbound bit rate | account_name, RegionId, userId, instanceId, ipsecId, tunnelId | bps |
tun_tx_pps |
IPsec tunnel outbound packet rate | account_name, RegionId, userId, instanceId, ipsecId, tunnelId | pps |
vpn_connection_rxPkgs |
VPN connection inbound packet rate | account_name, RegionId, userId, instanceId | pps |
vpn_connection_tx_rate |
VPN connection outbound bandwidth | account_name, RegionId, userId, instanceId | bps |
vpn_connection_txPkgs |
VPN connection outbound packet rate | account_name, RegionId, userId, instanceId | pps |
vpn_connection_rx_rate |
VPN connection inbound bit rate | account_name, RegionId, userId, instanceId | bps |
vpn_connection_tun_bgp_state |
BGP negotiation status of a VPN connection IPSec tunnel: 0 abnormal, 1 normal | account_name, RegionId, userId, instanceId, tunnelId | - |
vpn_connection_tun_rx_rate |
VPN connection single-tunnel inbound bit rate | account_name, RegionId, userId, instanceId, tunnelId | bps |
vpn_connection_tun_rxPkgs |
VPN connection single-tunnel inbound packet rate | account_name, RegionId, userId, instanceId, tunnelId | pps |
vpn_connection_tun_state |
IPsec tunnel negotiation status of a dual-tunnel VpnAttachment: 0 abnormal, 1 normal | account_name, RegionId, userId, instanceId, tunnelId | - |
vpn_connection_tun_tx_rate |
VPN connection single-tunnel outbound bandwidth | account_name, RegionId, userId, instanceId, tunnelId | bps |
vpn_connection_tun_txPkgs |
VPN connection single-tunnel outbound packet rate | account_name, RegionId, userId, instanceId, tunnelId | pps |
Objects¶
The collected Alibaba Cloud VPN object data has the following structure. View it under Infrastructure - Custom.
{
"measurement": "aliyun_vpn_gateway",
"tags": {
"cloud_provider": "aliyun",
"account_name": "example-account",
"RegionId": "cn-hangzhou",
"VpnGatewayId": "vpn-example",
"VpnGatewayName": "example-vpn-gateway",
"VpcId": "vpc-example"
},
"fields": {
"Status": "active",
"BusinessStatus": "Normal",
"NetworkType": "public",
"Spec": "5M",
"IpsecVpn": "enable",
"SslVpn": "enable",
"EnableBgp": true,
"ResourceCreateTime": 1794450277000,
"EndTime": 1797091200000
}
}
Note: Fields in tags and fields may change in future updates.