

# Understand monitoring with AWS Ground Station
<a name="monitoring"></a>

Monitoring is an important part of maintaining the reliability, availability, and performance of AWS Ground Station. AWS provides the following monitoring tools to watch AWS Ground Station, report when something is wrong, and take automatic actions when appropriate.
+  *Amazon EventBridge Events* delivers a near real-time stream of system events that describe changes in AWS resources. EventBridge Events enables automated event-driven computing, as you can write rules that watch for certain events and trigger automated actions in other AWS services when these events happen. For more information about EventBridge Events, see the [Amazon EventBridge Events User Guide](https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-events.html). 
+  *AWS CloudTrail* captures API calls and related events made by or on behalf of your AWS account and delivers the log files to an Amazon S3 bucket that you specify. You can identify which users and accounts called AWS, the source IP address from which the calls were made, and when the calls occurred. For more information about AWS CloudTrail, see the [AWS CloudTrail User Guide](https://docs.aws.amazon.com/awscloudtrail/latest/userguide/). 
+  *Amazon CloudWatch Metrics* captures metrics for your scheduled contacts when using AWS Ground Station. CloudWatch Metrics enables you to analyze data based on your channel, polarization, and satellite ID to identify signal strength and errors in your contacts. For more information, see [Using Amazon CloudWatch metrics](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/working_with_metrics.html). 
+  *[AWS User Notifications](https://docs.aws.amazon.com/notifications/latest/userguide/what-is.html)* can be used to set up delivery channels to get notified about AWS Ground Station events. You receive a notification when an event matches a rule that you specify. You can receive notifications for events through multiple channels, including email, [Amazon Q Developer in chat applications](https://docs.aws.amazon.com/chatbot/latest/adminguide/what-is.html) chat notifications, or [AWS Console Mobile Application](https://docs.aws.amazon.com/consolemobileapp/latest/userguide/what-is-consolemobileapp.html) push notifications. You can also see notifications in the AWS Console [Notification center](https://console.aws.amazon.com/notifications/). User Notifications support aggregation, which can reduce the number of notifications you receive during specific events. 

Use the following topics to monitor AWS Ground Station. 

**Topics**
+ [

# Automate AWS Ground Station with Events
](monitoring.automating-events.md)
+ [

# Log AWS Ground Station API calls with AWS CloudTrail
](monitoring.cloudtrail.md)
+ [

# View metrics with Amazon CloudWatch
](monitoring.metrics.md)

# Automate AWS Ground Station with Events
<a name="monitoring.automating-events"></a>

**Note**  
 This document uses the term “event” throughout. CloudWatch Events and EventBridge are the same underlying service and API. Rules to match incoming events and route them to targets for processing can be built using either service. 

 Events enable you to automate your AWS services and respond automatically to system events such as application availability issues or resource changes. Events from AWS services are delivered in near real time. You can write simple rules to indicate which events are of interest to you, and what automated actions to take when an event matches a rule. Some of the actions that can be automatically triggered include the following: 
+ Invoking an AWS Lambda function
+ Invoking Amazon EC2 Run Command
+ Relaying the event to Amazon Kinesis Data Streams
+ Activating an AWS Step Functions state machine
+ Notifying an Amazon SNS topic or an Amazon SQS queue

Some examples of using events with AWS Ground Station include:
+ Invoking a Lambda function to automate the starting and stopping of Amazon EC2 instances based off the event state. 
+ Publishing to an Amazon SNS topic whenever a contact changes states. These topics can be set up to send out email notices at the beginning or end of contacts. 

 For more information, see the [Amazon EventBridge Events User Guide](https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-events.html). 

## AWS Ground Station Event Types
<a name="gs-csc-event-types"></a>

**Note**  
 All events generated by AWS Ground Station have "aws.groundstation" as the value for "source". 

AWS Ground Station emits events related to state changes to support your ability to customize your automation. Currently, AWS Ground Station supports contact state change events, dataflow endpoint group change events, and ephemeris state change events. The following sections provide detailed information about each type. 

## Contact Event Timeline
<a name="monitoring.automating-events.contact-timeline"></a>

AWS Ground Station emits events when your contact changes states. For more information on what those state changes are, and what the states themselves mean, see [Understand contact lifecycle](contacts.lifecycle.md) . Any dataflow endpoint groups being used in your contact have an independent set of events that are also emitted. During that same timeframe, we also emit events for your dataflow endpoint group. The precise time of the pre-pass and post-pass events are configurable by you as you set up your mission profile and dataflow endpoint group. 

 The following diagram shows the statuses and events emitted for a nominal contact and its associated dataflow endpoint group. 

 ![\[Diagram showing statuses and events for a nominal contact and its associated dataflow endpoint group.\]](http://docs.aws.amazon.com/ground-station/latest/ug/images/monitoring.automating-events.contact-timeline.png) 

 **Ground Station Contact State Change** 

 If you want to perform a specific action when an upcoming contact is changing states, you can set up a rule to automate this action. This is helpful for when you want to receive notifications about the state changes of your contact. If you would like to change when you receive these events, you can modify your mission profile's [ contactPrePassDurationSeconds](https://docs.aws.amazon.com/ground-station/latest/APIReference/API_UpdateMissionProfile.html#groundstation-UpdateMissionProfile-request-contactPrePassDurationSeconds) and [ contactPostPassDurationSeconds](https://docs.aws.amazon.com/ground-station/latest/APIReference/API_UpdateMissionProfile.html#groundstation-UpdateMissionProfile-request-contactPostPassDurationSeconds). The events are sent to the region that the contact was scheduled from. 

 An example event is provided below. 

```
{
    "version": "0",
    "id": "01234567-0123-0123",
    "account": "123456789012",
    "time": "2019-05-30T17:40:30Z",
    "region": "us-west-2",
    "source": "aws.groundstation",
    "resources": [
        "arn:aws:groundstation:us-west-2:123456789012:contact/11111111-1111-1111-1111-111111111111"
    ],
    "detailType": "Ground Station Contact State Change",
    "detail": {
        "contactId": "11111111-1111-1111-1111-111111111111",
        "groundstationId": "Ground Station 1",
        "missionProfileArn": "arn:aws:groundstation:us-west-2:123456789012:mission-profile/11111111-1111-1111-1111-111111111111",
        "satelliteArn": "arn:aws:groundstation::123456789012:satellite/11111111-1111-1111-1111-111111111111",
        "contactStatus": "PASS"
    }
}
```

 The possible values for `contactStatus` are defined in [AWS Ground Station contact statuses](contacts.lifecycle.md#contact-statuses). 

 **Ground Station Dataflow Endpoint Group State Change** 

 If you want to perform an action when your dataflow endpoint group is being used to receive data, you can set up a rule to automate this action. This will allow you to perform different actions in response to the dataflow endpoint group status changing states. If you would like to change when you receive these events, use a dataflow endpoint group with different [contactPrePassDurationSeconds](https://docs.aws.amazon.com/ground-station/latest/APIReference/API_CreateDataflowEndpointGroup.html#groundstation-CreateDataflowEndpointGroup-request-contactPrePassDurationSeconds) and [contactPostPassDurationSeconds](https://docs.aws.amazon.com/ground-station/latest/APIReference/API_CreateDataflowEndpointGroup.html#groundstation-CreateDataflowEndpointGroup-request-contactPostPassDurationSeconds). This event will be sent to the region of the dataflow endpoint group. 

 An example is provided below. 

```
{
    "version": "0",
    "id": "01234567-0123-0123",
    "account": "123456789012",
    "time": "2019-05-30T17:40:30Z",
    "region": "us-west-2",
    "source": "aws.groundstation",
    "resources": [
        "arn:aws:groundstation:us-west-2:123456789012:dataflow-endpoint-group/bad957a8-1d60-4c45-a92a-39febd98921d",
        "arn:aws:groundstation:us-west-2:123456789012:contact/98ddd10f-f2bc-479c-bf7d-55644737fb09",
        "arn:aws:groundstation:us-west-2:123456789012:mission-profile/c513c84c-eb40-4473-88a2-d482648c9234"
    ],
    "detailType": "Ground Station Dataflow Endpoint Group State Change",
    "detail": {
        "dataflowEndpointGroupId": "bad957a8-1d60-4c45-a92a-39febd98921d",
        "groundstationId": "Ground Station 1",
        "contactId": "98ddd10f-f2bc-479c-bf7d-55644737fb09",
        "dataflowEndpointGroupArn": "arn:aws:groundstation:us-west-2:680367718957:dataflow-endpoint-group/bad957a8-1d60-4c45-a92a-39febd98921d",
        "missionProfileArn": "arn:aws:groundstation:us-west-2:123456789012:mission-profile/c513c84c-eb40-4473-88a2-d482648c9234",
        "dataflowEndpointGroupState": "PREPASS"
    }
}
```

 Possible states for the `dataflowEndpointGroupState` include `PREPASS`, `PASS`, `POSTPASS`, and `COMPLETED`. 

## Ephemeris Events
<a name="monitoring.automating-events.ephemeris"></a>

 **Ground Station Ephemeris State Change** 

 If you want to perform an action when an ephemeris changes state, you can set up a rule to automate this action. This allows you to perform different actions in response to an ephemeris changing state. For example, you can perform an action when an ephemeris has completed validation, and it is now `ENABLED`. Notification for this event will be sent to the region were the ephemeris was uploaded. 

 An example is provided below. 

```
{
    "id": "7bf73129-1428-4cd3-a780-95db273d1602",
    "detail-type": "Ground Station Ephemeris State Change",
    "source": "aws.groundstation",
    "account": "123456789012",
    "time": "2019-12-03T21:29:54Z",
    "region": "us-west-2",
    "resources": [
        "arn:aws:groundstation::123456789012:satellite/10313191-c9d9-4ecb-a5f2-bc55cab050ec",
        "arn:aws:groundstation::123456789012:ephemeris/111111-cccc-bbbb-a555-bcccca005000"
    ],
    "detail": {
        "ephemerisStatus": "ENABLED",
        "ephemerisId": "111111-cccc-bbbb-a555-bcccca005000",
        "satelliteId": "10313191-c9d9-4ecb-a5f2-bc55cab050ec"
    }
}
```

 Possible states for the `ephemerisStatus` include `ENABLED`, `VALIDATING`, `INVALID`, `ERROR`, `DISABLED`, `EXPIRED` 

# Log AWS Ground Station API calls with AWS CloudTrail
<a name="monitoring.cloudtrail"></a>

AWS Ground Station is integrated with AWS CloudTrail, a service that provides a record of actions taken by a user, role, or an AWS service in AWS Ground Station. CloudTrail captures all API calls for AWS Ground Station as events. The calls captured include calls from the AWS Ground Station console and code calls to the AWS Ground Station API operations. If you create a trail, you can enable continuous delivery of CloudTrail events to an Amazon S3 bucket, including events for AWS Ground Station. If you don't configure a trail, you can still view the most recent events in the CloudTrail console in **Event history**. Using the information collected by CloudTrail, you can determine the request that was made to AWS Ground Station, the IP address from which the request was made, who made the request, when it was made, and additional details. 

To learn more about CloudTrail, see the [AWS CloudTrail User Guide](https://docs.aws.amazon.com/awscloudtrail/latest/userguide/).

## AWS Ground Station Information in CloudTrail
<a name="monitoring.cloudtrail.service-name-info-in-cloudtrail"></a>

CloudTrail is enabled on your AWS account when you create the account. When activity occurs in AWS Ground Station, that activity is recorded in a CloudTrail event along with other AWS service events in **Event history**. You can view, search, and download recent events in your AWS account. For more information, see [Viewing Events with CloudTrail Event History](https://docs.aws.amazon.com/awscloudtrail/latest/userguide/view-cloudtrail-events.html). 

For an ongoing record of events in your AWS account, including events for AWS Ground Station, create a trail. A *trail* enables CloudTrail to deliver log files to an Amazon S3 bucket. By default, when you create a trail in the console, the trail applies to all AWS Regions. The trail logs events from all Regions in the AWS partition and delivers the log files to the Amazon S3 bucket that you specify. Additionally, you can configure other AWS services to further analyze and act upon the event data collected in CloudTrail logs. For more information, see the following: 
+ [Overview for Creating a Trail](https://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-create-and-update-a-trail.html)
+ [CloudTrail Supported Services and Integrations](https://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-aws-service-specific-topics.html#cloudtrail-aws-service-specific-topics-integrations)
+ [Configuring Amazon SNS Notifications for CloudTrail](https://docs.aws.amazon.com/awscloudtrail/latest/userguide/getting_notifications_top_level.html)
+ [Receiving CloudTrail Log Files from Multiple Regions](https://docs.aws.amazon.com/awscloudtrail/latest/userguide/receive-cloudtrail-log-files-from-multiple-regions.html) and [Receiving CloudTrail Log Files from Multiple Accounts](https://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-receive-logs-from-multiple-accounts.html)

All AWS Ground Station actions are logged by CloudTrail and are documented in the [AWS Ground Station API Reference](Welcome.html). For example, calls to the `ReserveContact`, `CancelContact` and `ListConfigs` actions generate entries in the CloudTrail log files. 

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 or AWS Identity and Access Management (IAM) user credentials.
+ Whether the request was made with temporary security credentials for a role or federated user.
+ Whether the request was made by another AWS service.

For more information, see the [CloudTrail userIdentity Element](https://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-event-reference-user-identity.html).

## Understanding AWS Ground Station Log File Entries
<a name="monitoring.cloudtrail.understanding-service-name-entries"></a>

A trail is a configuration that enables delivery of events as log files to an Amazon S3 bucket that you specify. CloudTrail log files contain one or more log entries. An event represents a single request from any source and includes information about the requested action, the date and time of the action, request parameters, and so on. CloudTrail log files aren't an ordered stack trace of the public API calls, so they don't appear in any specific order. 

The following example shows a CloudTrail log entry that demonstrates the `ReserveContact` action. 

**Example: ReserveContact**

```
 
{
    "eventVersion": "1.05",
    "userIdentity": {
        "type": "IAMUser",
        "principalId": "EX_PRINCIPAL_ID",
        "arn": "arn:aws:sts::123456789012:user/Alice",
        "accountId": "123456789012",
        "accessKeyId": "EXAMPLE_KEY_ID",
        "sessionContext": {
            "attributes": {
                "mfaAuthenticated": "false",
                "creationDate": "2019-05-15T21:11:59Z"
            },
            "sessionIssuer": {
                "type": "Role",
                "principalId": "EX_PRINCIPAL_ID",
                "arn": "arn:aws:iam::123456789012:role/Alice",
                "accountId": "123456789012",
                "userName": "Alice"
            }
        }
    },
    "eventTime": "2019-05-15T21:14:37Z",
    "eventSource": "groundstation.amazonaws.com",
    "eventName": "ReserveContact",
    "awsRegion": "us-east-2",
    "sourceIPAddress": "127.0.0.1",
    "userAgent": "Mozilla/5.0 Gecko/20100101 Firefox/123.0",
    "requestParameters": {
        "satelliteArn": "arn:aws:groundstation::123456789012:satellite/11111111-2222-3333-4444-555555555555",
        "groundStation": "Ohio 1",
        "startTime": 1558356107,
        "missionProfileArn": "arn:aws:groundstation:us-east-2:123456789012:mission-profile/11111111-2222-3333-4444-555555555555",
        "endTime": 1558356886
    },
    "responseElements": {
        "contactId": "11111111-2222-3333-4444-555555555555"
    },
    "requestID": "11111111-2222-3333-4444-555555555555",
    "eventID": "11111111-2222-3333-4444-555555555555",
    "readOnly": false,
    "eventType": "AwsApiCall",
    "recipientAccountId": "11111111-2222-3333-4444-555555555555"
}
```

# View metrics with Amazon CloudWatch
<a name="monitoring.metrics"></a>

During a contact, AWS Ground Station automatically captures and sends data to CloudWatch for analysis. Your data can be viewed in the Amazon CloudWatch console. For more information about accessing and CloudWatch Metrics, see [Using Amazon CloudWatch Metrics](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/working_with_metrics.html). 

The AWS Ground Station telemetry feature can also be used to receive near real-time metrics during contacts. CloudWatch metrics are not available in near real-time and may have delays in delivery. CloudWatch also aggregates metrics over a one-second period, potentially reducing data granularity. The telemetry feature provides the individual metrics and delivers them in near real-time directly to your AWS account. For more information, see [Work with telemetry](telemetry.md).

**Important**  
 AWS Ground Station emits CloudWatch metrics to the AWS region associated with the contact's ground station location, not the AWS region from which the contact was scheduled. To view metrics for a contact, you must access CloudWatch in the ground station region. For information about which AWS region is associated with each ground station location, see [Finding the AWS region for a ground station location](aws-ground-station-antenna-locations.md#aws-ground-station-antenna-locations.antenna-regions). To receive telemetry data in the region from which you schedule your contacts, you can use the AWS Ground Station telemetry feature. See [Work with telemetry](telemetry.md) for more details. 

## AWS Ground Station Metrics and Dimensions
<a name="monitoring.metrics.metrics-and-dimensions"></a>

### What metrics are available?
<a name="monitoring.metrics.metrics-and-dimensions.available-metrics"></a>

 The following metrics are available from AWS Ground Station. 

**Note**  
 The specific metrics emitted depend on the AWS Ground Station capabilities being used. Depending on your configuration, only a subset of the below metrics may be emitted. 


| Metric | Metric Dimensions | Description | 
| --- | --- | --- | 
|   `AzimuthAngle`   | SatelliteId |  The azimuth angle of the antenna. True north is 0 degrees and east is 90 degrees.  Units: degrees  | 
|   `BitErrorRate`   | Channel, Polarization, SatelliteId |  The error rate on bits in a given number of bit transmissions. Bit errors are caused by noise, distortion, or interference  Units: Bits errors per unit time  | 
|   `BlockErrorRate`   | Channel, Polarization, SatelliteId |  The error rate of blocks in a given number of received blocks. Block errors are caused by interference.  Units: Erroneous blocks / Total number of blocks  | 
|   `CarrierFrequencyRecovery_Cn0`   | Category, Config, SatelliteId |  Carrier to noise density ratio per unit bandwidth. Units: decibel-Hertz (dB-Hz)  | 
|   `CarrierFrequencyRecovery_Locked`   | Category, Config, SatelliteId |  Set to 1 when the demodulator carrier frequency recovery loop is locked and 0 when unlocked.  Units: unitless  | 
|   `CarrierFrequencyRecovery_OffsetFrequency_Hz`   | Category, Config, SatelliteId |  The offset between the estimated signal center and ideal center frequency. This is caused by Doppler shift and local oscillator offset between spacecraft and antenna system.  Units: hertz (Hz)  | 
|   `ElevationAngle`   | SatelliteId |  The elevation angle of the antenna. The horizon is 0 degrees and zenith is 90 degrees.  Units: degrees  | 
|   `Es/N0`   | Channel, Polarization, SatelliteId |  The ratio of energy per symbol to noise power spectral density. Units: decibels (dB)  | 
|   `ReceivedPower`   | Polarization, SatelliteId |  The measured signal strength in the demodulator/decoder. Units: decibels relative to milliwatts (dBm)  | 
|   `SymbolTimingRecovery_ErrorVectorMagnitude`   | Category, Config, SatelliteId |  The error vector magnitude between received symbols and ideal constellation points.  Units: percent  | 
|   `SymbolTimingRecovery_Locked`   | Category, Config, SatelliteId |  Set to 1 when the demodulator symbol timing recovery loop is locked and 0 when unlocked  Units: unitless  | 
|   `SymbolTimingRecovery_OffsetSymbolRate`   | Category, Config, SatelliteId |  The offset between the estimated symbol rate and ideal signal symbol rate. This is caused by Doppler shift and local oscillator offset between spacecraft and antenna system.  Units: symbols/second  | 

### What dimensions are used for AWS Ground Station?
<a name="monitoring.metrics.metrics-and-dimensions.metric-dimensions"></a>

 You can filter AWS Ground Station data using the following dimensions. 


| Dimension | Description | 
| --- | --- | 
|   `Category`   |  Demodulation or Decode.  | 
|   `Channel`   |  The channels for each contact include One, Two, I (in-phase), and Q (quadrature).  | 
|   `Config`   |  An antenna downlink demod decode config arn.  | 
|   `Polarization`   |  The polarization for each contact include LHCP (Left Hand Circular Polarized) or RHCP (Right Hand Circular Polarized).   | 
|   `SatelliteId`   |  The satellite ID contains the ARN of the satellite for your contacts.  | 

## Viewing Metrics
<a name="monitoring.metrics.viewing-metrics"></a>

 When viewing graphed metrics, it is important to note that the aggregation window determines how your metrics will be displayed. Each metric in a contact can be displayed as data per second for 3 hours after the data is received. Your data will be aggregated by CloudWatch Metrics as data per minute after that 3-hour period has elapsed. If you need to view your metrics on a data per second measurement, it is recommended to view your data within the 3-hour period after the data is received or persist it outside of CloudWatch Metrics. For more information on CloudWatch retention, see [Amazon CloudWatch concepts - Metric retention](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/cloudwatch_concepts.html#metrics-retention). 

 In addition, any data captured within the first 60 seconds will not contain enough information to produce meaningful metrics, and will likely not be displayed. In order to view meaningful metrics, it is recommended to view your data after 60 seconds has passed. 

 ![\[Graph showing pass metrics with dBm and error rate lines over time during 11 minutes of a contact.\]](http://docs.aws.amazon.com/ground-station/latest/ug/images/viewing-metrics.png) 

 For more information about graphing AWS Ground Station metrics in CloudWatch, see [Graphing Metrics](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/graph_metrics.html). 

### To view metrics using the console
<a name="monitoring.metrics.viewing-metrics.metrics-using-console"></a>

1.  Determine the AWS region associated with your ground station location. AWS Ground Station emits CloudWatch metrics in the region associated with your contact's ground station location. For the list of ground station locations and their associated AWS regions, see [Finding the AWS region for a ground station location](aws-ground-station-antenna-locations.md#aws-ground-station-antenna-locations.antenna-regions). 

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

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

1.  Select the **GroundStation** namespace.

    ![\[Interface showing metrics categorized by AWS services used, including a tile for AWS Ground Station, which will appear after metrics have been emitted from the service.\]](http://docs.aws.amazon.com/ground-station/latest/ug/images/GroundStation-namespace.png) 

1.  Select your desired metric dimensions (for example, **Channel, Polarization, SatelliteId**).

    ![\[Metrics interface showing "All metrics" tab with metrics grouped by dimensions, "Channel, Polarization, SatelliteId" and "Polarization, SatelliteId."\]](http://docs.aws.amazon.com/ground-station/latest/ug/images/metric-dimensions.png) 

1.  The **All metrics** tab displays all metrics for that dimension in the namespace. You can do the following:

   1.  To sort the table, use the column heading. 

   1.  To graph a metric, select the checkbox associated with the metric. To select all metrics, select the checkbox in the heading row of the table. 

   1.  To filter by resource, choose the resource ID and then choose **Add to search**. 

   1.  To filter by metric, choose the metric name and then choose **Add to search**. 

### To view metrics using AWS CLI
<a name="monitoring.metrics.viewing-metrics.metrics-using-cli"></a>

 AWS Ground Station emits CloudWatch metrics in the region associated with your contact's ground station location. For the list of ground station locations their associated AWS regions, [Finding the AWS region for a ground station location](aws-ground-station-antenna-locations.md#aws-ground-station-antenna-locations.antenna-regions). Replace * ground-station-region-code* with the AWS region code for your ground station location (for example, `us-west-2` for Oregon 1, Hawaii 1, or Alaska 1). All subsequent AWS CLI commands in this procedure must use the same region. 

1.  Ensure that AWS CLI is installed. For information about installing AWS CLI, see [Installing the AWS CLI version 2](https://docs.aws.amazon.com/cli/latest/userguide/install-cliv2.html). 

1.  Identify the AWS region associated with your ground station location.

1.  Use the [get-metric-data](https://docs.aws.amazon.com/cli/latest/reference/cloudwatch/get-metric-data.html) method of the CloudWatch CLI to generate a file that can be modified to specify the metrics that you're interested in, and then be used to query for those metrics. 

    To do this, run the following: `aws cloudwatch get-metric-data --region ground-station-region-code --generate-cli-skeleton`. This will generate output similar to: 

   ```
           {
              "MetricDataQueries": [
                 {
                    "Id": "",
                    "MetricStat": {
                       "Metric": {
                          "Namespace": "",
                          "MetricName": "",
                          "Dimensions": [
                             {
                                "Name": "",
                                "Value": ""
                             }
                          ]
                       },
                       "Period": 0,
                       "Stat": "",
                       "Unit": "Seconds"
                    },
                    "Expression": "",
                    "Label": "",
                    "ReturnData": true,
                    "Period": 0,
                    "AccountId": ""
                 } ],
              "StartTime": "1970-01-01T00:00:00",
              "EndTime": "1970-01-01T00:00:00",
              "NextToken": "",
              "ScanBy": "TimestampDescending",
              "MaxDatapoints": 0,
              "LabelOptions": {
                 "Timezone": ""
              }
           }
   ```

1. List the available CloudWatch metrics by running `aws cloudwatch list-metrics --region ground-station-region-code` .

   If you've recently used AWS Ground Station, the method should return output that contains entries like: 

   ```
           ...
           {
              "Namespace": "AWS/GroundStation",
              "MetricName": "ReceivedPower",
              "Dimensions": [
                 {
                    "Name": "Polarization",
                    "Value": "LHCP"
                 },
                 {
                    "Name": "SatelliteId",
                    "Value": "arn:aws:groundstation::111111111111:satellite/aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee"
                 }
              ]
          },
          ...
   ```
**Note**  
 If it's been over 2 weeks since you last used AWS Ground Station, then you will need to manually inspect the [table of available metrics](#monitoring.metrics.metrics-and-dimensions.available-metrics) to find the metric names and dimensions in the ` AWS/GroundStation` metric namespace. For more information about CloudWatch limitations see: [View available metrics](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/viewing_metrics_with_cloudwatch.html) 

1.  Modify the JSON file you created in step 2 to match the required values from step 3, for example `SatelliteId`, and `Polarization` from your metrics. Also be sure to update the `StartTime`, and `EndTime` values to match your contact. For example:

   ```
            {
               "MetricDataQueries": [
                  {
                     "Id": "receivedPowerExample",
                     "MetricStat": {
                        "Metric": {
                           "Namespace": "AWS/GroundStation",
                           "MetricName": "ReceivedPower",
                           "Dimensions": [
                              {
                                 "Name": "SatelliteId",
                                 "Value": "arn:aws:groundstation::111111111111:satellite/aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee"
                              },
                              {
                                 "Name": "Polarization",
                                 "Value": "RHCP"
                              }
                           ]
                        },
                        "Period": 300,
                        "Stat": "Maximum",
                        "Unit": "None"
                     },
                     "Label": "ReceivedPowerExample",
                     "ReturnData": true
                  }
               ],
               "StartTime": "2024-02-08T00:00:00",
               "EndTime": "2024-04-09T00:00:00"
            }
   ```
**Note**  
 AWS Ground Station publishes metrics every 1 to 60 seconds, depending on the metric. Metrics will not be returned if the `Period` field has a value less than the publishing period for the metric. 

1.  Run `aws cloudwatch get-metric-data` with the configuration file created in the previous steps. An example is provided below. 

   ```
   aws cloudwatch get-metric-data --region ground-station-region-code --cli-input-json file://<nameOfConfigurationFileCreatedInStep2>.json
   ```

 Metrics will be provided with timestamps from your contact. An example output of AWS Ground Station metrics is provided below.

```
{
   "MetricDataResults": [
      {
         "Id": "receivedPowerExample",
         "Label": "ReceivedPowerExample",
         "Timestamps": [
            "2024-04-08T18:35:00+00:00",
            "2024-04-08T18:30:00+00:00",
            "2024-04-08T18:25:00+00:00"
         ],
         "Values": [
            -33.30191555023193,
            -31.46100273132324,
            -32.13915576934814
         ],
         "StatusCode": "Complete"
      }
   ],
   "Messages": []
}
```