

サポート終了通知: 2025 年 9 月 15 日、 AWS は Amazon Lex V1 のサポートを終了します。 V1 2025 年 9 月 15 日を過ぎると、Amazon Lex V1 コンソールまたは Amazon Lex V1 リソースにはアクセスできなくなります。Amazon Lex V2 を使用している場合は、代わりに [Amazon Lex V2 ガイド](https://docs.aws.amazon.com/lexv2/latest/dg/what-is.html)を参照してください。

翻訳は機械翻訳により提供されています。提供された翻訳内容と英語版の間で齟齬、不一致または矛盾がある場合、英語版が優先します。

# Amazon CloudWatch による Amazon Lex のモニタリング
<a name="monitoring-aws-lex-cloudwatch"></a>

Amazon Lex ボットのヘルスを追跡するには、Amazon CloudWatch を使用します。CloudWatch では、アカウントの個別の Amazon Lex オペレーションまたはグローバルな Amazon Lex オペレーションのメトリクスを取得できます。定義したしきい値を 1 つ以上のメトリクスが超えたときに通知するよう CloudWatch アラームを設定することもできます。例えば、指定期間中にボットに送信されたリクエスト数をモニタリングして、成功したリクエストのレイテンシーを確認し、エラー数がしきい値を超えた場合はアラームを生成できます。

## Amazon Lex 用の CloudWatch メトリクス
<a name="aws-lex-cloudwatch-using"></a>

Amazon Lex オペレーションのメトリクスを取得するには、以下の情報を指定する必要があります。
+ メトリクスディメンション。*ディメンション*は、メトリクスを識別するための名前と値のペアのセットです。Amazon Lex には 3 つのディメンションがあります。
  + `BotAlias, BotName, Operation`
  + `BotAlias, BotName, InputMode, Operation`
  + `BotName, BotVersion, InputMode, Operation`
+ メトリクス名 (`MissedUtteranceCount`、`RuntimeRequestCount` など)。

Amazon Lex のメトリクスは、 AWS マネジメントコンソール、、 AWS CLIまたは CloudWatch API を使用して取得できます。CloudWatch API は、いずれかの Amazon AWS Software Development Kit (SDK) または Amazon CloudWatch API ツールでも使用できます。Amazon Lex コンソールには、CloudWatch API のraw データに基づいてグラフが表示されます。

CloudWatch で Amazon Lex をモニタリングするには、適切な CloudWatch アクセス権限が必要です。詳細については、*「Amazon CloudWatch ユーザーガイド」*の[「Authentication and Access Control for Amazon CloudWatch」](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/auth-and-access-control-cw.html)(Amazon CloudWatch に対する認証とアクセスコントロール) を参照してください。

## Amazon Lex メトリクスの表示
<a name="aws-lex-cloudwatch-metrics"></a>

Amazon Lex コンソールまたは CloudWatch コンソールを使用して、Amazon Lex メトリクスを表示します。

**メトリクスを表示するには (Amazon Lex コンソール)**

1. にサインイン AWS マネジメントコンソール し、[https://console.aws.amazon.com/lex/](https://console.aws.amazon.com/lex/) で Amazon Lex コンソールを開きます。

1. ボットのリストから、メトリクスを表示する対象のボットを選択します。

1. [**モニタリング**] を選択します。メトリクスがグラフに表示されます。

**メトリクスを表示する方法 (CloudWatch コンソール)**

1. にサインイン AWS マネジメントコンソール し、[https://console.aws.amazon.com/cloudwatch/](https://console.aws.amazon.com/cloudwatch/) で CloudWatch コンソールを開きます。

1. [**Metrics**] で、[**All Metrics**]、[**AWS/Lex**] の順に選択します。

1. ディメンションを選択してメトリクスの名前を選んだら、**グラフに追加** を選択します。

1. 日付範囲の値を選択します。選択した日付範囲のメトリクスカウントがグラフに表示されます。

## アラームを作成する
<a name="aws-lex-cloudwatch-alarms"></a>

CloudWatch アラームは指定期間中に単一のメトリクスを監視し、1 つ以上のアクションを実行して Amazon Simple Notification Service (Amazon SNS) トピックまたは Auto Scaling ポリシーに通知を送信します。アクションは、複数の指定期間にわたって特定のしきい値を基準としたメトリクスの値に応じて実行されます。アラームの状態が変わったときにも、CloudWatch は Amazon SNS メッセージを送信できます。

CloudWatch アラームがアクションを呼び出すのは、状態が変わってから指定期間が経過するまで、その新しい状態が続いた場合に限ります。

**アラームを設定するには**

1. にサインイン AWS マネジメントコンソール し、[https://console.aws.amazon.com/cloudwatch/](https://console.aws.amazon.com/cloudwatch/) で CloudWatch コンソールを開きます。

1. [**Alarms**]、[**Create Alarm**] の順に選択します。

1. [**AWS/Lex Metrics**] を選択し、メトリクスを選択します。

1. **[Time Range]** (時間の範囲) で、モニタリングする期間を選択し、**[Next]** (次へ) を選択します。

1. **[Name]** (名前) と **[Description]** (説明) を入力します。

1.  **[Whenever]** (以下のときは毎回) で [**>=**] を選択し、最大値を入力します。

1. アラーム状態に達したときに CloudWatch から E メールを送信する場合は、**[Actions]** (アクション) セクションの **[Whenever this alarm]** (アラームが次の時) で、**[State is ALARM]** (状態: 警告) を選択します。[**通知の送信先**] でメーリングリストを選択するか、[**新しいリスト**] を選択して新しいメーリングリストを作成します。

1. **[Alarm Preview]** (アラームの確認) セクションでアラームをプレビューします。アラームに問題がなければ、[**Create Alarm**] (アラームの作成) を選択します。

## Amazon Lex ランタイムの CloudWatch メトリクス
<a name="cloudwatch-dimensions-for-aws-lex-runtime"></a>

次の表は、Amazon Lex のランタイムメトリクスを示しています。


| メトリクス | 説明 | 
| --- | --- | 
| KendraIndexAccessError | Amazon Lex がお客様の Amazon Kendra インデックスにアクセスできなかった回数。 `Text` または `Speech` `InputMode` での `PostContent` オペレーションの有効なディメンション: [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/ja_jp/lex/latest/dg/monitoring-aws-lex-cloudwatch.html) `PostText` オペレーションの有効なディメンション: [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/ja_jp/lex/latest/dg/monitoring-aws-lex-cloudwatch.html) 単位: 数  | 
| KendraLatency | `AMAZON.KendraSearchIntent` からのリクエストに Amazon Kendra が応答するまでの時間です。`Text` または `Speech` `InputMode` での `PostContent` オペレーションの有効なディメンション: [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/ja_jp/lex/latest/dg/monitoring-aws-lex-cloudwatch.html) `PostText` オペレーションの有効なディメンション: [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/ja_jp/lex/latest/dg/monitoring-aws-lex-cloudwatch.html) 単位: ミリ秒 | 
| KendraSuccess | `AMAZON.KendraSearchIntent` から Amazon Kendra インデックスへの成功したリクエストの数。`Text` または `Speech` `InputMode` での `PostContent` オペレーションの有効なディメンション: [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/ja_jp/lex/latest/dg/monitoring-aws-lex-cloudwatch.html) `PostText` オペレーションの有効なディメンション: [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/ja_jp/lex/latest/dg/monitoring-aws-lex-cloudwatch.html) 単位: 数 | 
| KendraSystemErrors | Amazon Lex が Amazon Kendra インデックスをクエリできなかった回数。 `Text` または `Speech` `InputMode` での `PostContent` オペレーションの有効なディメンション: [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/ja_jp/lex/latest/dg/monitoring-aws-lex-cloudwatch.html) `PostText` オペレーションの有効なディメンション: [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/ja_jp/lex/latest/dg/monitoring-aws-lex-cloudwatch.html) 単位: 数  | 
| KendraThrottledEvents | Amazon Kendra が `AMAZON.KendraSearchIntent` からのリクエストをスロットルした回数。 `Text` または `Speech` `InputMode` での `PostContent` オペレーションの有効なディメンション: [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/ja_jp/lex/latest/dg/monitoring-aws-lex-cloudwatch.html) `PostText` オペレーションの有効なディメンション: [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/ja_jp/lex/latest/dg/monitoring-aws-lex-cloudwatch.html) 単位: 数  | 
| MissedUtteranceCount |  指定期間中に認識されなかった発話の数。 `Text ` または `Speech` `InputMode` での `PostContent` オペレーションの有効なディメンション: [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/ja_jp/lex/latest/dg/monitoring-aws-lex-cloudwatch.html) `PostText` オペレーションの有効なディメンション: [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/ja_jp/lex/latest/dg/monitoring-aws-lex-cloudwatch.html)  | 
|  `RuntimeConcurrency`  |  指定期間中の同時接続の数。`RuntimeConcurrency` は `StatisticSet` として報告されます。 `Text` または `Speech` `InputMode` での `PostContent` オペレーションの有効なディメンション: [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/ja_jp/lex/latest/dg/monitoring-aws-lex-cloudwatch.html) 他のオペレーションの有効なディメンション: [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/ja_jp/lex/latest/dg/monitoring-aws-lex-cloudwatch.html) 単位: 数  | 
| RuntimeInvalidLambdaResponses |  指定された期間における無効な AWS Lambda (Lambda) レスポンスの数。 `Text` または `Speech` `InputMode` での `PostContent` オペレーションの有効なディメンション: [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/ja_jp/lex/latest/dg/monitoring-aws-lex-cloudwatch.html) `PostText` オペレーションの有効なディメンション: [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/ja_jp/lex/latest/dg/monitoring-aws-lex-cloudwatch.html)  | 
| RuntimeLambdaErrors | 指定期間中の Lambda ランタイムエラーの数。`PostContent` または `Text ``Speech` での ` InputMode` オペレーションの有効なディメンション:[\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/ja_jp/lex/latest/dg/monitoring-aws-lex-cloudwatch.html)`PostText` オペレーションの有効なディメンション: [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/ja_jp/lex/latest/dg/monitoring-aws-lex-cloudwatch.html)  | 
| RuntimePollyErrors |  指定期間中の無効な Amazon Polly レスポンスの数。 `Text` または `Speech` `InputMode` での `PostContent` オペレーションの有効なディメンション: [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/ja_jp/lex/latest/dg/monitoring-aws-lex-cloudwatch.html) `PostText` オペレーションの有効なディメンション: [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/ja_jp/lex/latest/dg/monitoring-aws-lex-cloudwatch.html)  | 
| RuntimeRequestCount |  指定期間中のランタイムリクエストの数。 `Text` または `Speech` `InputMode` での `PostContent` オペレーションの有効なディメンション: [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/ja_jp/lex/latest/dg/monitoring-aws-lex-cloudwatch.html) `PostText` オペレーションの有効なディメンション: [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/ja_jp/lex/latest/dg/monitoring-aws-lex-cloudwatch.html) 単位: 数  | 
| RuntimeSucessfulRequestLatency  このメトリクスは `RuntimeSucessfulRequestLatency` で、`RuntimeSuccessfulRequestLatency` ではありません。  |  リクエストが送信された時間からレスポンスが返された時間までに成功したリクエストのレイテンシー。 `Text` または `Speech` `InputMode` での `PostContent` オペレーションの有効なディメンション: [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/ja_jp/lex/latest/dg/monitoring-aws-lex-cloudwatch.html) `PostText` オペレーションの有効なディメンション: [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/ja_jp/lex/latest/dg/monitoring-aws-lex-cloudwatch.html) 単位: ミリ秒  | 
| RuntimeSystemErrors |  指定期間中のシステムエラーの数。システムエラーのレスポンスコード範囲は 500〜599 です。 `Text` または `Speech` `InputMode` での `PostContent` オペレーションの有効なディメンション: [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/ja_jp/lex/latest/dg/monitoring-aws-lex-cloudwatch.html) `PostText` オペレーションの有効なディメンション: [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/ja_jp/lex/latest/dg/monitoring-aws-lex-cloudwatch.html) 単位: 数  | 
| RuntimeThrottledEvents |  スロットルされたリクエストの数。Amazon Lex は、1 秒あたりに受け取るトランザクションの数がアカウントに設定された制限数を超えると、リクエストをスロットルします。アカウントに設定された制限を頻繁に超える場合は、制限の引き上げをリクエストできます。引き上げをリクエストするには、「[AWS サービス制限](https://docs.aws.amazon.com/general/latest/gr/aws_service_limits.html)」を参照してください。 `Text` または `Speech` `InputMode` での `PostContent` オペレーションの有効なディメンション: [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/ja_jp/lex/latest/dg/monitoring-aws-lex-cloudwatch.html) `PostText` オペレーションの有効なディメンション: [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/ja_jp/lex/latest/dg/monitoring-aws-lex-cloudwatch.html) 単位: 数  | 
| RuntimeUserErrors |  指定期間中のユーザーエラーの数。ユーザーエラーのレスポンスコード範囲は 400〜499 です。 `Text` または `Speech` `InputMode` での `PostContent` オペレーションの有効なディメンション: [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/ja_jp/lex/latest/dg/monitoring-aws-lex-cloudwatch.html) `PostText` オペレーションの有効なディメンション: [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/ja_jp/lex/latest/dg/monitoring-aws-lex-cloudwatch.html) 単位: 数  | 

Amazon Lex ランタイムメトリクスは `AWS/Lex` 名前空間を使用して、以下のディメンションのメトリクスを提供します。メトリクスは、CloudWatch コンソールのディメンション別にグループ化できます。


| ディメンション | 説明 | 
| --- | --- | 
| BotName, BotAlias, Operation, InputMode | ボットのエイリアス、ボットの名前、オペレーション (PostContent)、および入力がテキストまたは音声であるかに基づいて、メトリクスをグループ化します。 | 
| BotName, BotVersion, Operation, InputMode | ボットの名前、ボットのバージョン、オペレーション (PostContent)、および入力がテキストまたは音声であるかに基づいて、メトリクスをグループ化します。 | 
| BotName, BotVersion, Operation | ボットの名前、ボットのバージョン、およびオペレーション PostText に基づいて、メトリクスをグループ化します。 | 
| BotName, BotAlias, Operation | ボットの名前、ボットのエイリアス、およびオペレーション PostText に基づいて、メトリクスをグループ化します。 | 

## Amazon Lex チャンネルアソシエーションの CloudWatch メトリクス
<a name="cloudwatch-dimensions-for-aws-lex-channels"></a>

チャンネル関連付けは、Amazon Lex とメッセージングチャンネル (Facebook など) との関連付けです。次の表は、Amazon Lex のチャンネル関連付けの説明です。


| メトリクス | 説明 | 
| --- | --- | 
| BotChannelAuthErrors | 指定期間中にメッセージングチャンネルから返された認証エラーの数。認証エラーは、チャンネルの作成時に提供されたシークレットトークンが無効であるか、期限切れになっていることを示します。  | 
| BotChannelConfigurationErrors | 指定期間中の設定エラーの数。設定エラーは、チャンネルの 1 つ以上の設定エントリが無効であることを示します。  | 
| BotChannelInboundThrottledEvents | メッセージングチャンネルから送信されたメッセージが、指定期間中に Amazon Lex でスロットルされた回数。  | 
| BotChannelOutboundThrottledEvents | Amazon Lex からメッセージングチャンネルへのアウトバウンドイベントが指定期間中にスロットルされた回数。  | 
| BotChannelRequestCount | 指定期間中にチャンネルで送信されたリクエストの数。  | 
| BotChannelResponseCardErrors | 指定期間中に Amazon Lex がレスポンスカードを投稿できなかった回数。  | 
| BotChannelSystemErrors | 指定期間中にチャンネルに対して Amazon Lex で発生した内部エラーの数。  | 

Amazon Lex のチャンネル関連付けメトリクスでは `AWS/Lex` 名前空間を使用し、以下のディメンションのメトリクスを提供します。メトリクスは、CloudWatch コンソールのディメンション別にグループ化できます。


| ディメンション | 説明 | 
| --- | --- | 
| BotAlias, BotChannelName, BotName, Source | ボットのエイリアス、チャンネル名、ボットの名前、トラフィックのソースに基づいてメトリクスをグループ化します。 | 

## 会話ログの CloudWatch メトリクス
<a name="cloudwatch-metrics-for-logging"></a>

Amazon Lex は、会話ログに次のメトリクスを使用します。


| メトリクス | 説明 | 
| --- | --- | 
| ConversationLogsAudioDeliverySuccess | 指定した期間中に S3 バケットに正常に配信されたオーディオログの数。 単位: カウント | 
| ConversationLogsAudioDeliveryFailure | 指定した期間中に S3 バケットへの配信に失敗したオーディオログの数。配信エラーは、会話ログ用に構成されたリソースのエラーを示します。エラーには、不十分な IAM アクセス許可、アクセスできない AWS KMS キー、またはアクセスできない S3 バケットが含まれます。単位: カウント | 
| ConversationLogsTextDeliverySuccess | 指定した期間中に CloudWatch Logs に正常に配信されたテキストログの数。 単位: カウント | 
| ConversationLogsTextDeliveryFailure | 指定した期間中に CloudWatch Logs への配信に失敗したテキストログの数。配信エラーは、会話ログ用に構成されたリソースのエラーを示します。エラーには、不十分な IAM アクセス許可、アクセスできない AWS KMS キー、またはアクセスできない CloudWatch Logs ロググループが含まれます。 単位: カウント | 

Amazon Lex 会話ログメトリクスは `AWS/Lex` 名前空間を使用し、以下のディメンションのメトリクスを提供します。メトリクスは、CloudWatch コンソールのディメンション別にグループ化できます。


| ディメンション | 説明 | 
| --- | --- | 
| `BotAlias` | ボットのエイリアスでメトリクスをグループ化する。 | 
| `BotName` | ボットの名前でメトリクスをグループ化する。 | 
| `BotVersion` | ボットのバージョンごとにメトリクスをグループ化する。 | 