The transitgateway metricset of aws module allows users to monitor transit gateway.
Transit gateway metrics are sent to CloudWatch by VPC only when requests are
flowing through the gateway. If there are requests flowing through the transit
gateway, Amazon VPC measures and sends its metrics in 1-minute intervals.
Users can use these metrics to gain a better perspective on how the web application or
service is performing.

[float]
=== AWS Permissions
Some specific AWS permissions are required for IAM user to collect usage metrics.
----
ec2:DescribeRegions
cloudwatch:GetMetricData
cloudwatch:ListMetrics
tag:getResources
sts:GetCallerIdentity
iam:ListAccountAliases
----

[float]
=== Configuration example
[source,yaml]
----
- module: aws
  period: 1m
  metricsets:
    - transitgateway
  # This module uses the aws cloudwatch metricset, all
  # the options for this metricset are also available here.
----

[float]
=== Metrics and Dimensions for Transit gateway
Metrics:
|===
|Metric Name|Statistic Method | Description
|BytesIn | Sum | The number of bytes received by the transit gateway.
|BytesOut | Sum | The number of bytes sent from the transit gateway.
|PacketsIn | Sum | The number of packets received by the transit gateway.
|PacketsOut | Sum | The number of packets sent by the transit gateway.
|PacketDropCountBlackhole | Sum | The number of packets dropped because they matched a blackhole route.
|PacketDropCountNoRoute | Sum | The number of packets dropped because they did not match a route.
|===

Dimensions:
|===
|Dimension Name| Description
|TransitGateway | Filters the metric data by transit gateway.
|===

Please see https://docs.aws.amazon.com/vpc/latest/tgw/transit-gateway-cloudwatch-metrics.html[Transit Gateway Metrics] for more details.
