

# Monitoring with CloudWatch
<a name="monitoring-cloudwatch"></a>

Amazon CloudWatch (CloudWatch) collects raw data and processes it into readable, near real-time metrics. You can open the CloudWatch console at [https://console.aws.amazon.com/cloudwatch/](https://console.aws.amazon.com/cloudwatch/) to view and filter Deadline Cloud metrics.

These statistics are kept for 15 months so you can access historical information to gain a better perspective on how your web application or service is performing. You can also set alarms that watch for certain thresholds, and send notifications or take actions when those thresholds are met. For more information, see the [Amazon CloudWatch User Guide](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/).

Deadline Cloud has two kinds of logs – task logs and worker logs. A task log is when you run execution logs as a script or as DCC runs. A task log might show events such as assets loading, tiles rendering, or textures not being found.

A worker log shows worker agent processes. These might include things such as when the worker agents starts up, registers itself, reports progress, loads configurations, or completes tasks.

The namespace for these logs is `/aws/deadline/*`.

For Deadline Cloud, workers upload these logs to CloudWatch Logs. By default, logs never expire. If a job outputs a high volume of data, you can incur extra costs. For more information, see [Amazon CloudWatch pricing](https://aws.amazon.com/cloudwatch/pricing/#Paid_tier).

You can adjust the retention policy for each log group. A shorter retention removes old logs and can help reduce storage costs. To keep logs, you can archive them to Amazon Simple Storage Service before removing the log. For more information, see [ Export log data to Amazon S3 using the console ](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/S3ExportTasksConsole.html) in the *Amazon CloudWatch user guide*.

**Note**  
CloudWatch log reads are limited by AWS. If you plan to onboard many artists, we suggest you contact AWS customer support and request an increase for the `GetLogEvents` quota in CloudWatch. Additionally, we recommend you close the log tailing portal when you are not debugging.

For more information, see [CloudWatch Logs quotas](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/cloudwatch_limits_cwl.html) in the *Amazon CloudWatch user guide*.

# CloudWatch metrics
<a name="cloudwatch-metrics"></a>

Deadline Cloud sends metrics to Amazon CloudWatch. You can use the AWS Management Console, the AWS CLI, or an API to list the metrics that Deadline Cloud sends to CloudWatch. By default, each data point covers the 1 minute that follows the start time of activity. For information about how to view the available metrics using the AWS Management Console or the AWS CLI, see [View available metrics](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/viewing_metrics_with_cloudwatch.html) in the *Amazon CloudWatch User Guide*.

## Customer-managed fleet metrics
<a name="cloudwatch-metrics-cmf"></a>

The `AWS/DeadlineCloud` namespace contains the following metrics for your customer-managed fleets:


| Metric | Description | Unit | 
| --- | --- | --- | 
| RecommendedFleetSize | The number of workers that Deadline Cloud recommends that you use to process jobs. You can use this metric to expand or contract the number of workers from your fleet. | Count | 
| UnhealthyWorkerCount | The number of workers assigned to process jobs that are not healthy. | Count | 

You can use the following dimensions to refine the customer-managed fleet metrics:


| Dimension | Description | 
| --- | --- | 
| FarmId | This dimension filters the data that you request to the specified farm. | 
| FleetId | This dimension filters the data that you request to the specified worker fleet. | 

## Licensing metrics
<a name="cloudwatch-metrics-licensing"></a>

The `AWS/DeadlineCloud` namespace contains the following metrics for licensing:


| Metric | Description | Unit | 
| --- | --- | --- | 
| LicensesInUse | The number of license sessions in use. | Count | 

You can use the following dimensions to refine the licensing metrics:


| Dimension | Description | 
| --- | --- | 
| FleetId | Use this dimension to filter the data to the specified service-managed fleet. For customer-managed fleets, use the LicenseEndpointId dimension instead. | 
| LicenseEndpointId | Use this dimension to filter the data to the specified license endpoint. | 
| Product | Use this dimension to filter the data to the specified metered product. | 

## Resource limit metrics
<a name="cloudwatch-metrics-limits"></a>

The `AWS/DeadlineCloud` namespace contains the following metrics for resource limits:


| Metric | Description | Unit | 
| --- | --- | --- | 
| CurrentCount | The number of resources modeled by this limit in use. | Count | 
| MaxCount | The maximum number of resources modeled by this limit. If you set the maxCount value to -1 using the API, Deadline Cloud doesn't emit the MaxCount metric. | Count | 

You can use the following dimensions to refine the concurrent limit metrics:


| Dimension | Description | 
| --- | --- | 
| FarmId | This dimension filters the data that you request to the specified farm. | 
| LimitId | This dimension filters the data that you request to the specified limit. | 

# Recommended alarms
<a name="recommended-alarms"></a>

With CloudWatch, you can create alarms that watch metrics and send you a notification or perform another action when a threshold is breached. For more information on configuring CloudWatch alarms, see the [Amazon CloudWatch User Guide](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/).

We recommend that you set alarms for the following Deadline Cloud metrics:

**LicensesInUse**  
**Dimensions: ** FleetId, LicenseEndpointId  
**Alarm description: **This alarm detects when the active license sessions for a service-managed fleet or license endpoint are approaching your account quota. If this occurs, you can raise the account quota for license sessions. See your current quotas and request increases using Service Quotas. To learn more, see the [Service Quotas User Guide](https://docs.aws.amazon.com/servicequotas/latest/userguide/).  
**Intent: **Prevent license checkout failures by monitoring usage before it reaches the quota limit.  
**Statistic: **Maximum  
**Recommended threshold: ** 90% of your license session quota  
**Threshold justification: ** Set the threshold to a percentage of your quota, so that you can take action before it reaches the limit.  
**Period: **1 minute  
**Datapoints to alarm: **1  
**Evaluation periods: **1  
**Comparison Operator: ** `GREATER_THAN_THRESHOLD`

## Additional resources
<a name="recommended-alarms-additional-resources"></a>
+ [Amazon CloudWatch User Guide](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/)
+ [Service Quotas User Guide](https://docs.aws.amazon.com/servicequotas/latest/userguide/)