Skip to content

AWS VPC Transit Gateway

Collect AWS VPC Transit Gateway metrics data

Configuration

Install Func

We recommend enabling hosted Func under Integration - Extensions in TrueWatch. All prerequisites are installed automatically; continue with the script installation.

If deploying Func manually, refer to Manual Deployment of Func

Install Script

Note: Please prepare the required Amazon AK in advance (for simplicity, you can grant global read-only permissions ReadOnlyAccess)

Activate Scripts in Hosted Func

  1. Log in to the TrueWatch console
  2. Click the 【Integration】 menu and select 【Cloud Account Management】
  3. 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
  4. 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
  5. 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
  6. Click 【Integration】 on the cloud account details page, find AWS VPC Transit Gateway in the Not Installed list and click 【Install】 to open the installation form.

Manual Activation Script

  1. Log in to the Func console, click 【Script Market】, open the TrueWatch script market and search for integration_aws_transit_gateway.

  2. Click 【Install】, then enter the corresponding parameters: AWS AK ID, AK Secret, and account name.

  3. Click 【Deploy Startup Script】 to create the Startup script set and configure the corresponding startup scripts automatically.

  4. After enabling the script, open 【Management / Automatic Trigger Configuration】 to view its 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

  1. Under 【Management / Automatic Trigger Configuration】, confirm that the task has an automatic trigger configuration. Review its task records and logs for errors.
  2. In TrueWatch, check 【Infrastructure - Resource Catalog】 for asset information.
  3. In TrueWatch, check 【Metrics】 for the corresponding monitoring data.

Metrics

Configure Amazon CloudWatch to collect more metrics. For details, refer to Amazon CloudWatch Metrics Details

AWS VPC Transit Gateway metrics are under the aws_AWS/TransitGateway Measurement, and the description column includes the description, unit, and statistics of each metric.

Metric Description Unit
BytesDropCountBlackhole The number of bytes dropped due to matching with blackhole routes Bytes
BytesDropCountNoRoute The number of bytes dropped due to no matching routes Bytes
BytesIn The number of bytes received by the transit gateway Bytes
BytesOut The number of bytes sent by the transit gateway Bytes
PacketsIn The number of packets received by the transit gateway Count
PacketsOut The number of packets sent by the transit gateway Count
PacketDropCountBlackhole The number of packets dropped due to matching with blackhole routes Count
PacketDropCountNoRoute The number of packets dropped due to no matching routes Count
PacketDropCountTTLExpired The number of packets dropped due to TTL expiration Count

Object

The collected AWS VPC Transit Gateway object data structure can be viewed in 「Infrastructure - Resource Catalog」.

{
  "measurement": "aws_transit_gateway",
  "tags": {
    "OwnerId"          : "xxxx",
    "RegionId"         : "cn-north-1",
    "State"            : "available",
    "TransitGatewayArn": "arn: xxx",
    "TransitGatewayId" : "tgw-xxx",
    "name"             : "tgw-xxx"
  },
  "fields": {
    "CreationTime": "2023-11-22T09:00:42Z",
    "Description" : "Description of the transit gateway",
    "Options"     : "{Transit gateway options}",
    "Tags"        : "[Tags of the transit channel]",
    "message"     : "{Instance JSON Data}"
  }
}

Note: The fields in tags and fields may change with subsequent updates