

本文属于机器翻译版本。若本译文内容与英语原文存在差异，则一律以英文原文为准。

# 使用亚马逊监控亚马逊 Kendra CloudWatch
<a name="cloudwatch-metrics"></a>

要跟踪索引的运行状况，请使用 Amazon CloudWatch。使用 CloudWatch，您可以获取索引的文档同步指标。您还可以设置 CloudWatch 警报，以便在一个或多个指标超过您定义的阈值时收到通知。例如，您可以监控已提交要编制索引的文档数量或无法编制索引的文档数量。

您必须拥有相应的 CloudWatch 权限才能使用它来监控 Amazon Kendra。 CloudWatch有关更多信息，请参阅《亚马逊* CloudWatch用户指南》 CloudWatch*中的 [Amazon 身份验证和访问控制](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/auth-and-access-control-cw.html)。

## 查看 Amazon Kendra 指标
<a name="viewing-metrics"></a>

使用控制台查看 Amazon Kendra 指标。 CloudWatch 

**查看指标（CloudWatch 控制台）**

1. 登录 AWS 管理控制台 并打开 CloudWatch 控制台，网址为[https://console.aws.amazon.com/cloudwatch/](https://console.aws.amazon.com/cloudwatch/)。

1. 依次选择**指标**、**所有指标**，然后选择 **Kendra**。

1. 选择维度、指标名称，然后选择 **添加到图表**。

1. 选择日期范围的值。所选日期范围的指标计数将显示在该图表中。

## 创建警报
<a name="cloudwatch-alarms"></a>

 CloudWatch 警报在指定时间段内监视单个指标并执行一项或多项操作：向亚马逊简单通知服务 (Amazon SNS) Simple Notification Service top 或 Auto Scaling 策略发送通知。操作或操作基于指标在您指定的多个时间段内相对于给定阈值的值。 CloudWatch 还可以在警报状态发生变化时向您发送 Amazon SNS 消息。

CloudWatch 警报仅在状态发生变化并且持续到您指定的时间段内时才会调用操作。

**设置警报**

1. 登录 AWS 管理控制台 并打开 CloudWatch 控制台，网址为[https://console.aws.amazon.com/cloudwatch/](https://console.aws.amazon.com/cloudwatch/)。

1. 选择**警报**，然后选择**创建警报**。

1. 选择一个指标。为您的索引和数据来源选择一个 **Kendra** 指标。您还可以将时间设置为设定的小时数、天数、周数或自定义值。

1. 选择统计数据。例如，**平均值**。还可以选择警报触发时间段，例如，设定的分钟数、小时数、天数或自定义值。

1. 选择触发警报的阈值，是使用静态值还是范围值，以及达到阈值的条件。

1. 选择触发器的警报状态，指标是否必须超出设定的阈值，或其他状态。选择要向其发送警报通知的 who/which 电子邮件。

1. 如果对警报满意，请选择**创建警报**。

**注意**  
您必须为 CloudWatch 警报提供一个名称。

## CloudWatch 索引同步作业的指标
<a name="cloudwatch-metric-sync-jobs"></a>

下表介绍了数据来源同步任务的 Amazon Kendra 指标。

如果您使用 API 或 CLI，则除了在使用 API 时选择的之外，还必须将指定`Namespace`为 “AWS/kendra”。`MetricName` [GetMetricStatistics](https://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/API_GetMetricStatistics.html)


| 指标 | 说明 | 
| --- | --- | 
| DocumentsCrawled | 同步作业在运行期间扫描或发现的文档数量。<br />维度：[See the AWS documentation website for more details](http://docs.aws.amazon.com/zh_cn/kendra/latest/dg/cloudwatch-metrics.html)<br />单位：个 | 
| DocumentsSubmittedForIndexing | 同步作业提交到索引的文档数量。<br />维度：[See the AWS documentation website for more details](http://docs.aws.amazon.com/zh_cn/kendra/latest/dg/cloudwatch-metrics.html)<br />单位：个 | 
| DocumentsSubmittedForIndexingFailed | 创建索引失败的文档数量。有关详细信息，请查看同步作业的 CloudWatch 日志内容。<br />维度：[See the AWS documentation website for more details](http://docs.aws.amazon.com/zh_cn/kendra/latest/dg/cloudwatch-metrics.html)<br />单位：个 | 
| DocumentsSubmittedForDeletion | 要求从索引中移除同步作业的文档数量。<br />维度：[See the AWS documentation website for more details](http://docs.aws.amazon.com/zh_cn/kendra/latest/dg/cloudwatch-metrics.html)<br />单位：个 | 
| DocumentsSubmittedForDeletionFailed | 删除失败的文档数量。有关详细信息，请查看同步作业的 CloudWatch 日志内容。<br />维度：[See the AWS documentation website for more details](http://docs.aws.amazon.com/zh_cn/kendra/latest/dg/cloudwatch-metrics.html)<br />单位：个 | 

## Amazon Kendra 数据来源的指标
<a name="cloudwatch-metrics-data-source"></a>

下表介绍了数据来源同步任务的 Amazon Kendra 指标。标有星号（\*）的指标仅适用于 Amazon S3 数据来源。

如果您使用 API 或 CLI，则除了在使用 API 时选择的之外，还必须将指定`Namespace`为 “AWS/kendra”。`MetricName` [GetMetricStatistics](https://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/API_GetMetricStatistics.html)


| 指标 | 说明 | 
| --- | --- | 
| DocumentsSkippedNoChange \* | 已检查但发现未更改，因而未提交以供创建索引的文档数量。<br />维度：[See the AWS documentation website for more details](http://docs.aws.amazon.com/zh_cn/kendra/latest/dg/cloudwatch-metrics.html)<br />单位：个 | 
| DocumentsSkippedInvalidMetadata \* | 由于关联的元数据文件有问题而跳过的文档数量。有关详细信息，请查看同步运行 CloudWatch 日志的内容。<br />维度：[See the AWS documentation website for more details](http://docs.aws.amazon.com/zh_cn/kendra/latest/dg/cloudwatch-metrics.html)<br />单位：个 | 
| DocumentsCrawled | 已检查的文档文件数量。<br />维度：[See the AWS documentation website for more details](http://docs.aws.amazon.com/zh_cn/kendra/latest/dg/cloudwatch-metrics.html)<br />单位：个 | 
| DocumentsSubmittedForDeletion | 已从数据来源中删除并提交以供删除的已检查文档的数量。<br />维度：[See the AWS documentation website for more details](http://docs.aws.amazon.com/zh_cn/kendra/latest/dg/cloudwatch-metrics.html)<br />单位：个 | 
| DocumentsSubmittedForDeletionFailed | 从数据来源中删除失败的文档数量。<br />维度：[See the AWS documentation website for more details](http://docs.aws.amazon.com/zh_cn/kendra/latest/dg/cloudwatch-metrics.html)<br />单位：个 | 
| DocumentsSubmittedForIndexing | 已审查并提交索引的文件数量。<br />维度：[See the AWS documentation website for more details](http://docs.aws.amazon.com/zh_cn/kendra/latest/dg/cloudwatch-metrics.html)<br />单位：个 | 
| DocumentsSubmittedForIndexingFailed | 已提交以供创建索引但无法创建索引的文档数量。<br />维度：[See the AWS documentation website for more details](http://docs.aws.amazon.com/zh_cn/kendra/latest/dg/cloudwatch-metrics.html)<br />单位：个 | 

## 已创建索引的文档的指标
<a name="cloudwatch-metrics-id"></a>

下表介绍了已创建索引的文档的 Amazon Kendra 指标。对于使用[BatchPutDocument](https://docs.aws.amazon.com/kendra/latest/APIReference/API_BatchPutDocument.html)操作编制索引的文档，仅支持`IndexId`维度。

如果您使用 API 或 CLI，则除了在使用 API 时选择的之外，还必须将指定`Namespace`为 “AWS/kendra”。`MetricName` [GetMetricStatistics](https://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/API_GetMetricStatistics.html)


| 指标 | 说明 | 
| --- | --- | 
| DocumentsIndexed | 已创建索引的文档数量。<br />维度：[See the AWS documentation website for more details](http://docs.aws.amazon.com/zh_cn/kendra/latest/dg/cloudwatch-metrics.html)<br />单位：个 | 
| DocumentsFailedToIndex | 无法创建索引的文档数量。有关详细信息，请查看 CloudWatch 日志的内容。<br />维度：[See the AWS documentation website for more details](http://docs.aws.amazon.com/zh_cn/kendra/latest/dg/cloudwatch-metrics.html)<br />单位：个 | 
| IndexQueryCount | 每分钟的索引查询数量。<br />维度：[See the AWS documentation website for more details](http://docs.aws.amazon.com/zh_cn/kendra/latest/dg/cloudwatch-metrics.html)<br />单位：个 | 