

# Monitor your Outposts rack
<a name="monitor-outposts"></a>

AWS Outposts integrates with the following services that offer monitoring and logging capabilities:

**CloudWatch metrics**  
Use Amazon CloudWatch to retrieve statistics about data points for your Outposts rack as an ordered set of time series data, known as *metrics*. You can use these metrics to verify that your system is performing as expected. For more information, see [CloudWatch metrics for Outposts racks](outposts-cloudwatch-metrics.md).

**CloudTrail logs**  
Use AWS CloudTrail to capture detailed information about the calls made to AWS APIs. You can store these calls as log files in Amazon S3. You can use these CloudTrail logs to determine such information as which call was made, the source IP address where the call came from, who made the call, and when the call was made.  
The CloudTrail logs contain information about the calls to API actions for AWS Outposts. They also contain information for calls to API actions from services on an Outpost, such as Amazon EC2 and Amazon EBS. For more information, see [Log API calls using CloudTrail](logging-using-cloudtrail.md).

**VPC Flow Logs**  
Use VPC Flow Logs to capture detailed information about the traffic going to and from your Outpost and within your Outpost. For more information, see [VPC Flow Logs](https://docs.aws.amazon.com/vpc/latest/userguide/flow-logs.html) in the *Amazon VPC User Guide*.

**Traffic Mirroring**  
Use Traffic Mirroring to copy and forward network traffic from your Outposts rack to out-of-band security and monitoring appliances. You can use the mirrored traffic for content inspection, threat monitoring, or troubleshooting. For more information, see the [Amazon VPC Traffic Mirroring Guide](https://docs.aws.amazon.com/vpc/latest/mirroring/what-is-traffic-mirroring.html).

**AWS Health Dashboard**  
The Health Dashboard displays information and notifications that are initiated by changes in the health of AWS resources. The information is presented in two ways: on a dashboard that shows recent and upcoming events organized by category, and in a full event log that shows all events from the past 90 days. For example, a connectivity issue on the service link would initiate an event that would appear on the dashboard and event log, and remain in the event log for 90 days. A part of the AWS Health service, Health Dashboard requires no setup and can be viewed by any user that is authenticated in your account. For more information, see [Getting started with the AWS Health Dashboard](https://docs.aws.amazon.com/health/latest/ug/getting-started-health-dashboard.html).

# CloudWatch metrics for Outposts racks
<a name="outposts-cloudwatch-metrics"></a>

AWS Outposts publishes data points to Amazon CloudWatch for your Outposts. CloudWatch enables you to retrieve statistics about those data points as an ordered set of time series data, known as *metrics*. Think of a metric as a variable to monitor, and the data points as the values of that variable over time. For example, you can monitor the instance capacity available to your Outpost over a specified time period. Each data point has an associated timestamp and an optional unit of measurement.

You can use metrics to verify that your system is performing as expected. For example, you can create a CloudWatch alarm to monitor the `ConnectedStatus` metric. If the average metric is less than `1`, CloudWatch can initiate an action, such as sending a notification to an email address. You can then investigate potential on-premises or uplink networking issues that might be impacting the operations of your Outpost. Common issues include recent on-premises network configuration changes to firewall and NAT rules, or internet connection issues. For `ConnectedStatus` issues, we recommend verifying connectivity to the AWS Region from within your on-premises network, and contacting AWS Support if the problem persists.

For more information about creating a CloudWatch alarm, see [Using Amazon CloudWatch Alarms](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/AlarmThatSendsEmail.html) in the *Amazon CloudWatch User Guide*. For more information about CloudWatch, see the [Amazon CloudWatch User Guide](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/).

**Topics**
+ [Metrics](#outposts-metrics)
+ [Metric dimensions](#outposts-metric-dimensions)
+ [View CloudWatch metrics for your Outposts rack](#view-metric-data)

## Metrics
<a name="outposts-metrics"></a>

The `AWS/Outposts` namespace includes the following categories of metrics.

**Topics**
+ [Instance metrics](#metrics-instances)
+ [Amazon EBS metrics](#metrics-ebs)
+ [Virtual interface metrics](#metrics-vif)
+ [Outposts metrics](#metrics-outposts)

### Instance metrics
<a name="metrics-instances"></a>

The following metrics are available for Amazon EC2 instances.


| Metric | Dimension | Description | 
| --- | --- | --- | 
|  `InstanceFamilyCapacityAvailability` | `InstanceFamily` and `OutpostId` | The percentage of instance capacity available. This metric does not include capacity for any Dedicated Hosts configured on the Outpost. **Unit**: Percent **Maximum resolution**: 5 minutes **Statistics**: The most useful statistics are `Average` and `pNN.NN` (percentiles).  | 
|  `InstanceFamilyCapacityUtilization` | `Account`, `InstanceFamily`, and `OutpostId` | The percentage of instance capacity in use. This metric does not include capacity for any Dedicated Hosts configured on the Outpost. **Unit**: Percent **Maximum resolution**: 5 minutes **Statistics**: The most useful statistics are `Average` and `pNN.NN` (percentiles).  | 
|  `InstanceTypeCapacityAvailability` | `InstanceType` and `OutpostId` | The percentage of instance capacity available. This metric does not include capacity for any Dedicated Hosts configured on the Outpost. **Unit**: Percent **Maximum resolution**: 5 minutes **Statistics**: The most useful statistics are `Average` and `pNN.NN` (percentiles).  | 
| `InstanceTypeCapacityUtilization` | `Account`, `InstanceType`, and `OutpostId` | The percentage of instance capacity in use. This metric does not include capacity for any Dedicated Hosts configured on the Outpost. **Unit**: Percent **Maximum resolution**: 5 minutes **Statistics**: The most useful statistics are `Average` and `pNN.NN` (percentiles). | 
| `UsedInstanceType_Count` | `Account`, `InstanceType`, and `OutpostId` | The number of instance types that are currently in use, including any instance types used by managed services such as Amazon Relational Database Service (Amazon RDS) or Application Load Balancer. This metric does not include capacity for any Dedicated Hosts configured on the Outpost. **Unit**: Count **Maximum resolution**: 5 minutes | 
| `AvailableInstanceType_Count` | `InstanceType` and `OutpostId` | The number of available instance types. This metric includes the `AvailableReservedInstances` count. To determine the number of instances that you can reserve, subtract the `AvailableReservedInstances` count from the `AvailableInstanceType_Count` count. <pre>Number of instances that you can reserve = AvailableInstanceType_Count - AvailableReservedInstances</pre>  This metric does not include capacity for any Dedicated Hosts configured on the Outpost. **Unit**: Count **Maximum resolution**: 5 minutes | 
| `AvailableReservedInstances` | `InstanceType` and `OutpostId` | The number of instances that are available for launch into the compute capacity reserved using [Capacity Reservations](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/capacity-reservations-outposts.html). This metric does not include Amazon EC2 Reserved Instances. This metric does not include the number of instances that you can reserve. To determine how many instances you can reserve, subtract the `AvailableReservedInstances` count from the `AvailableInstanceType_Count` count. <pre>Number of instances that you can reserve = AvailableInstanceType_Count - AvailableReservedInstances</pre> **Unit**: Count **Maximum resolution**: 5 minutes | 
| `UsedReservedInstances` | `InstanceType` and `OutpostId` | The number of instances that are running in the compute capacity reserved using [Capacity Reservations](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/capacity-reservations-outposts.html). This metric does not include Amazon EC2 Reserved Instances. **Unit**: Count **Maximum resolution**: 5 minutes | 
| `TotalReservedInstances` | `InstanceType` and `OutpostId` | The total number of instances, running and available for launch, provided by the compute capacity reserved using [Capacity Reservations](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/capacity-reservations-outposts.html). This metric does not include Amazon EC2 Reserved Instances. **Unit**: Count **Maximum resolution**: 5 minutes | 

### Amazon EBS metrics
<a name="metrics-ebs"></a>

The following metrics are available for the EBS volume type capacity.


| Metric | Dimension | Description | 
| --- | --- | --- | 
| `EBSVolumeTypeCapacityUtilization` | `VolumeType` and `OutpostId` | The percentage of EBS volume type capacity in use. **Unit**: Percent **Maximum resolution**: 5 minutes **Statistics**: The most useful statistics are `Average` and `pNN.NN` (percentiles). | 
| `EBSVolumeTypeCapacityAvailability` | `VolumeType` and `OutpostId` | The percentage of EBS volume type capacity available. **Unit**: Percent **Maximum resolution**: 5 minutes **Statistics**: The most useful statistics are `Average` and `pNN.NN` (percentiles). | 
| `EBSVolumeTypeCapacityUtilizationGB` | `VolumeType` and `OutpostId` | The number of gigabytes in use for the EBS volume type. **Unit**: Gigabyte **Maximum resolution**: 5 minutes **Statistics**: The most useful statistics are `Average` and `pNN.NN` (percentiles). | 
| `EBSVolumeTypeCapacityAvailabilityGB` | `VolumeType` and `OutpostId` | The number of gigabytes of available capacity for the EBS volume type. **Unit**: Gigabyte **Maximum resolution**: 5 minutes **Statistics**: The most useful statistics are `Average` and `pNN.NN` (percentiles). | 

### Virtual interface metrics
<a name="metrics-vif"></a>

The following metrics are available for the virtual interface (VIF).


| Metric | Dimension | Description | 
| --- | --- | --- | 
| `VifBgpSessionState` | **Dimensions for local gateway VIFs**: `OutpostsId`, `VirtualInterfaceGroupId`, `VirtualInterfaceId`. **Dimensions for service link VIFs**: `OutpostsId`, `VirtualInterfaceId`. | The Border Gateway Protocol (BGP) session state between the AWS Outposts of virtual interface (VIF) and on-premise devices. **Unit**: Values 1 through 6 where: [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/outposts/latest/userguide/outposts-cloudwatch-metrics.html) **Maximum resolution**: 5 minute **Statistics**: The most useful statistic is `Maximum`. | 
| `VifConnectionStatus` | **Dimensions for local gateway VIFs**: `OutpostsId`, `VirtualInterfaceGroupId`, `VirtualInterfaceId`. **Dimensions for service link VIFs**: `OutpostsId`, `VirtualInterfaceId`. | Shows whether the virtual interfaces (VIFs) are ready to forward traffic. **Unit**: 1 or 0 where: [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/outposts/latest/userguide/outposts-cloudwatch-metrics.html) **Maximum resolution**: 5 minute **Statistics**: The most useful statistic is `Maximum`.  | 
| `IfTrafficIn` | **Dimensions for local gateway VIFs (lgw-vif)**: `OutpostsId`, `VirtualInterfaceGroupId`, and `VirtualInterfaceId` **Dimensions for service link VIFs (sl-vif)**: `OutpostsId` and `VirtualInterfaceId` | The bitrate of data that the Outposts Virtual Interfaces (VIFs) receive from the connected local network devices. **Unit**: Bits per second **Maximum resolution**: 5 minutes **Statistics**: The most useful statistics are `Max` and `Min`. | 
| `IfTrafficOut` | **Dimensions for local gateway VIFs (lgw-vif)**: `OutpostsId`, `VirtualInterfaceGroupId`, and `VirtualInterfaceId` **Dimensions for service link VIFs (sl-vif)**: `OutpostsId` and `VirtualInterfaceId` | The bitrate of data that the Outposts Virtual Interfaces (VIFs) transfer to the connected local network devices. **Unit**: Bits per second **Maximum resolution**: 5 minutes **Statistics**: The most useful statistics are `Max` and `Min`. | 

### Outposts metrics
<a name="metrics-outposts"></a>

The following metrics are available for your Outposts.


| Metric | Dimension | Description | 
| --- | --- | --- | 
| `ConnectedStatus` | `OutpostId` | The status of an Outpost's service link connection. If the average statistic is less than `1`, the connection is impaired. **Unit**: Count **Maximum resolution**: 1 minute **Statistics**: The most useful statistic is `Average`. | 
| `CapacityExceptions` | `InstanceType` and `OutpostId` | The number of insufficient capacity errors for instance launches. **Unit**: Count **Maximum resolution**: 5 minutes **Statistics**: The most useful statistics are `Maximum` and `Minimum`. | 

## Metric dimensions
<a name="outposts-metric-dimensions"></a>

To filter the metrics for your Outpost, use the following dimensions.


| Dimension | Description | 
| --- | --- | 
| Account |  The account or service using the capacity.  | 
| InstanceFamily |  The instance family.  | 
| InstanceType |  The instance type.  | 
| OutpostId |  The ID of the Outpost.  | 
| VolumeType |  The EBS volume type.  | 
| VirtualInterfaceId |  The ID of the local gateway or service link Virtual Interface (VIF).  | 
| VirtualInterfaceGroupId |  The ID of the virtual interface group for the local gateway Virtual Interface (VIF).  | 

## View CloudWatch metrics for your Outposts rack
<a name="view-metric-data"></a>

You can view the CloudWatch metrics for your Outposts rack using the CloudWatch console.

**To view metrics using the CloudWatch console**

1. Open the CloudWatch console at [https://console.aws.amazon.com/cloudwatch/](https://console.aws.amazon.com/cloudwatch/).

1. In the navigation pane, choose **Metrics**.

1. Select the **Outposts** namespace.

1. (Optional) To view a metric across all dimensions, enter its name in the search field.

**To view metrics using the AWS CLI**  
Use the following [list-metrics](https://docs.aws.amazon.com/cli/latest/reference/cloudwatch/list-metrics.html) command to list the available metrics.

```
aws cloudwatch list-metrics --namespace AWS/Outposts
```

**To get the statistics for a metric using the AWS CLI**  
Use the following [get-metric-statistics](https://docs.aws.amazon.com/cli/latest/reference/cloudwatch/get-metric-statistics.html) command to get statistics for the specified metric and dimension. CloudWatch treats each unique combination of dimensions as a separate metric. You can't retrieve statistics using combinations of dimensions that were not specially published. You must specify the same dimensions that were used when the metrics were created.

```
aws cloudwatch get-metric-statistics \
--namespace AWS/Outposts --metric-name InstanceTypeCapacityUtilization \
--statistics Average --period 3600 \
--dimensions Name=OutpostId,Value=op-01234567890abcdef Name=InstanceType,Value=c5.xlarge \
--start-time 2019-12-01T00:00:00Z --end-time 2019-12-08T00:00:00Z
```

# Log AWS Outposts API calls using AWS CloudTrail
<a name="logging-using-cloudtrail"></a>

AWS Outposts is integrated with AWS CloudTrail, a service that provides a record of actions taken by a user, role, or an AWS service. CloudTrail captures API calls for AWS Outposts as events. The calls captured include calls from the AWS Outposts console and code calls to the AWS Outposts API operations. Using the information collected by CloudTrail, you can determine the request that was made to AWS Outposts, the IP address from which the request was made, when it was made, and additional details.

Every event or log entry contains information about who generated the request. The identity information helps you determine the following:
+ Whether the request was made with root user or user credentials.
+ Whether the request was made on behalf of an IAM Identity Center user.
+ Whether the request was made with temporary security credentials for a role or federated user.
+ Whether the request was made by another AWS service.

CloudTrail is active in your AWS account when you create the account, and you automatically have access to the CloudTrail **Event history**. The CloudTrail **Event history** provides a viewable, searchable, downloadable, and immutable record of the past 90 days of recorded management events in an AWS Region. For more information, see [Working with CloudTrail Event history](https://docs.aws.amazon.com/awscloudtrail/latest/userguide/view-cloudtrail-events.html) in the *AWS CloudTrail User Guide*. There are no CloudTrail charges for viewing the **Event history**.

For an ongoing record of events in your AWS account past 90 days, create a trail or a [CloudTrail Lake](https://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-lake.html) event data store.

**CloudTrail trails**  
A *trail* enables CloudTrail to deliver log files to an Amazon S3 bucket. All trails created using the AWS Management Console are multi-Region. You can create a single-Region or a multi-Region trail by using the AWS CLI. Creating a multi-Region trail is recommended because you capture activity in all AWS Regions in your account. If you create a single-Region trail, you can view only the events logged in the trail's AWS Region. For more information about trails, see [Creating a trail for your AWS account](https://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-create-and-update-a-trail.html) and [Creating a trail for an organization](https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-trail-organization.html) in the *AWS CloudTrail User Guide*.  
You can deliver one copy of your ongoing management events to your Amazon S3 bucket at no charge from CloudTrail by creating a trail, however, there are Amazon S3 storage charges. For more information about CloudTrail pricing, see [AWS CloudTrail Pricing](https://aws.amazon.com/cloudtrail/pricing/). For information about Amazon S3 pricing, see [Amazon S3 Pricing](https://aws.amazon.com/s3/pricing/).

**CloudTrail Lake event data stores**  
*CloudTrail Lake* lets you run SQL-based queries on your events. CloudTrail Lake converts existing events in row-based JSON format to [ Apache ORC](https://orc.apache.org/) format. ORC is a columnar storage format that is optimized for fast retrieval of data. Events are aggregated into *event data stores*, which are immutable collections of events based on criteria that you select by applying [advanced event selectors](https://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-lake-concepts.html#adv-event-selectors). The selectors that you apply to an event data store control which events persist and are available for you to query. For more information about CloudTrail Lake, see [Working with AWS CloudTrail Lake](https://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-lake.html) in the *AWS CloudTrail User Guide*.  
CloudTrail Lake event data stores and queries incur costs. When you create an event data store, you choose the [pricing option](https://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-lake-manage-costs.html#cloudtrail-lake-manage-costs-pricing-option) you want to use for the event data store. The pricing option determines the cost for ingesting and storing events, and the default and maximum retention period for the event data store. For more information about CloudTrail pricing, see [AWS CloudTrail Pricing](https://aws.amazon.com/cloudtrail/pricing/).

## AWS Outposts management events in CloudTrail
<a name="cloudtrail-management-events"></a>

[Management events](https://docs.aws.amazon.com/awscloudtrail/latest/userguide/logging-management-events-with-cloudtrail.html#logging-management-events) provide information about management operations that are performed on resources in your AWS account. These are also known as control plane operations. By default, CloudTrail logs management events.

AWS Outposts logs all AWS Outposts control plane operations as management events. For a list of the AWS Outposts control plane operations that AWS Outposts logs to CloudTrail, see the [AWS Outposts API Reference](https://docs.aws.amazon.com/outposts/latest/APIReference/Welcome.html).

## AWS Outposts event examples
<a name="understanding-outposts-entries"></a>

The following example shows a CloudTrail event that demonstrates the `SetSiteAddress` operation.

```
{
    "eventVersion": "1.05",
    "userIdentity": {
        "type": "AssumedRole",
        "principalId": "AKIAIOSFODNN7EXAMPLE:jdoe",
        "arn": "arn:aws:sts::111122223333:assumed-role/example/jdoe",
        "accountId": "111122223333",
        "accessKeyId": "AKIAI44QH8DHBEXAMPLE",
        "sessionContext": {
            "sessionIssuer": {
                "type": "Role",
                "principalId": "AKIAIOSFODNN7EXAMPLE",
                "arn": "arn:aws:iam::111122223333:role/example",
                "accountId": "111122223333",
                "userName": "example"
            },
            "webIdFederationData": {},
            "attributes": {
                "mfaAuthenticated": "false",
                "creationDate": "2020-08-14T16:28:16Z"
            }
        }
    },
    "eventTime": "2020-08-14T16:32:23Z",
    "eventSource": "outposts.amazonaws.com",
    "eventName": "SetSiteAddress",
    "awsRegion": "us-west-2",
    "sourceIPAddress": "XXX.XXX.XXX.XXX",
    "userAgent": "userAgent",
    "requestParameters": {
        "SiteId": "os-123ab4c56789de01f",
        "Address": "***"
    },
    "responseElements": {
        "Address": "***",
        "SiteId": "os-123ab4c56789de01f"
    },
    "requestID": "1abcd23e-f4gh-567j-klm8-9np01q234r56",
    "eventID": "1234a56b-c78d-9e0f-g1h2-34jk56m7n890",
    "readOnly": false,
    "eventType": "AwsApiCall",
    "recipientAccountId": "111122223333"
}
```