

本文為英文版的機器翻譯版本，如內容有任何歧義或不一致之處，概以英文版為準。

# 使用 Amazon CloudWatch 監控 License Manager
<a name="monitoring-cloudwatch"></a>

您可以使用 Amazon CloudWatch 監控 License Manager 的指標統計資料。這些統計資料會保留 15 個月，以便您存取歷史資訊，並更清楚 Web 應用程式或服務的執行效能。您可以設定留意特定閾值的警示，當滿足這些閾值時傳送通知或採取動作。例如，您可以使用 `LicenseConfigurationUsagePercentage` 指標觀察授權的百分比，並在超過限制之前採取動作。如需更多資訊，請參閱 [Amazon CloudWatch 使用者指南](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/)。

License Manager 每小時會在 `AWSLicenseManager/licenseUsage` 命名空間中發出下列指標：


| 指標 | 描述 | 
| --- | --- | 
| RunningInstancesCount | 目前帳戶中執行的執行個體總數，依訂閱名稱分組。<br />單位：Count<br />維度：<br />`SubscriptionName`：訂閱的名稱。 | 
| AggregateRunningInstancesCount | 目前 AWS Organizations 中所有帳戶執行的執行個體彙總總數 AWS 區域。<br />單位：Count<br />維度：<br />`SubscriptionName`：訂閱的名稱。 | 
| TotalLicenseConfigurationUsageCount | 可用的授權組態總數。<br />單位：Count<br />維度：[See the AWS documentation website for more details](http://docs.aws.amazon.com/zh_tw/license-manager/latest/userguide/monitoring-cloudwatch.html) | 
| LicenseConfigurationUsageCount | 此組態的已使用授權總數。<br />單位：Count<br />維度：[See the AWS documentation website for more details](http://docs.aws.amazon.com/zh_tw/license-manager/latest/userguide/monitoring-cloudwatch.html) | 
| LicenseConfigurationUsagePercentage | 此授權組態的使用授權以百分比表示。<br />單位：百分比<br />維度：[See the AWS documentation website for more details](http://docs.aws.amazon.com/zh_tw/license-manager/latest/userguide/monitoring-cloudwatch.html) | 
| InstanceCount | 授權資產群組內的執行個體數量。<br />單位：Count<br />維度：[See the AWS documentation website for more details](http://docs.aws.amazon.com/zh_tw/license-manager/latest/userguide/monitoring-cloudwatch.html) | 
| InstanceConsumedLicenseCount | 授權資產群組內執行個體的已耗用授權數量。<br />單位：Count<br />維度：[See the AWS documentation website for more details](http://docs.aws.amazon.com/zh_tw/license-manager/latest/userguide/monitoring-cloudwatch.html) | 

## 建立警示以監控 License Manager 指標
<a name="monitoring-cloudwatch-alarms"></a>

您可以建立 CloudWatch 警示，在指標值變更並導致警示變更狀態時傳送 Amazon Simple Notification Service (Amazon SNS) 訊息。警示會監看指定時段內的指標，並根據與多個時段內指定閾值相對的指標值來執行動作。警示僅會針對持續狀態變更調用動作。CloudWatch 警示不會只因處於特定狀態就調用動作，狀態必須已變更並已維持一段指定的時間。如需詳細資訊，請參閱[使用 CloudWatch 警示](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/AlarmThatSendsEmail.html)。