

# Monitoring License Manager with Amazon CloudWatch

You can monitor metric statistics for License Manager by using Amazon CloudWatch. These statistics are kept for 15 months, so that you can access historical information and gain a better perspective on how your web application or service is performing. You can set alarms that watch for certain thresholds and send notifications or take actions when those thresholds are met. For example, you can watch for the percentage of licenses using the `LicenseConfigurationUsagePercentage` metric, and take action before limits are exceeded. For more information, see the [Amazon CloudWatch User Guide](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/).

License Manager emits the following metrics hourly in the `AWSLicenseManager/licenseUsage` namespace:


| Metric | Description | 
| --- | --- | 
| RunningInstancesCount | The total number of instances running in the current account that are grouped by the subscription name.<br />Units: Count<br />Dimensions:<br />`SubscriptionName`: The name of the subscription. | 
| AggregateRunningInstancesCount | The aggregated total number of instances that are running across all of your accounts in AWS Organizations in the current AWS Region.<br />Units: Count<br />Dimensions:<br />`SubscriptionName`: The name of the subscription. | 
| TotalLicenseConfigurationUsageCount | The total number of a license configuration that could be available.<br />Units: Count<br />Dimensions:+  `LicenseConfigurationArn`: The license configuration Amazon Resource Name (ARN). <br />+  `LicenseConfigurationType`: The license configuration type.   | 
| LicenseConfigurationUsageCount | The total number of used licenses of this configuration.<br />Units: Count<br />Dimensions:+  `LicenseConfigurationArn`: The license configuration ARN. <br />+  `LicenseConfigurationType`: The license configuration type.   | 
| LicenseConfigurationUsagePercentage | The used licenses of this license configuration expressed as a percentage.<br />Units: Percent<br />Dimensions:+  `LicenseConfigurationArn`: The license configuration ARN. <br />+  `LicenseConfigurationType`: The license configuration type.   | 
| InstanceCount | Number of instances within a license asset group.<br />Units: Count<br />Dimensions:+  `LicenseAssetGroupArn`: The license asset group ARN. <br />+  `LicensingModel`: The licensing model (LicenseIncluded or AWSMarketplace). Available only for license asset groups with AWS-managed rulesets.  | 
| InstanceConsumedLicenseCount | Number of consumed licenses for instances within a license asset group.<br />Units: Count<br />Dimensions:+  `LicenseAssetGroupArn`: The license asset group ARN. <br />+  `LicenseCountingType`: The license counting type (Instance, vCPU, Socket, or Core). <br />+  `LicensingModel`: The licensing model (LicenseIncluded or AWSMarketplace). Available only for license asset groups with AWS-managed rulesets.  | 

## Creating alarms to monitor License Manager metrics
<a name="monitoring-cloudwatch-alarms"></a>

You can create a CloudWatch alarm that sends an Amazon Simple Notification Service (Amazon SNS) message when the value of the metric changes and causes the alarm to change state. An alarm watches a metric over a time period you specify, and performs actions based on the value of the metric relative to a given threshold over a number of time periods. Alarms invoke actions for sustained state changes only. CloudWatch alarms do not invoke actions simply because they are in a particular state; the state must have changed and been maintained for a specified number of periods. For more information, see [Using CloudWatch alarms](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/AlarmThatSendsEmail.html).