

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

# 使用指标监控 Amazon Bedrock Guardrails CloudWatch
<a name="monitoring-guardrails-cw-metrics"></a>

下表描述了 Amazon Bedrock Guardrails 提供的运行时指标，您可以使用亚马逊指标对其进行监控。 CloudWatch 

**运行时指标**


| 指标名称 | 单位 | 说明 | 
| --- | --- | --- | 
| Invocations | SampleCount | 请求执行 ApplyGuardrail API 操作的次数 | 
| InvocationLatency | MilliSeconds | 调用的延迟时间 | 
| InvocationClientErrors | SampleCount | 导致发生客户端错误的调用次数 | 
| InvocationServerErrors | SampleCount | 导致服务器端错误的调用次数 AWS  | 
| InvocationThrottles | SampleCount | 系统节流的调用次数。受限请求不会计入调用次数或错误数 | 
| TextUnitCount | SampleCount | 防护机制策略消耗的文本单元数量 | 
| InvocationsIntervened | SampleCount | 防护机制干预的调用次数 | 
| FindingCounts | SampleCount | 每种类型的发现都计数 InvokeAutomatedReasoningCheck | 
| TotalFindings | SampleCount | 计算为每个 InvokeAutomatedReasoningCheck 请求生成的调查结果数量 | 
| Invocations | SampleCount | 向发出的请求数 InvokeAutomatedReasoningCheck | 
| 延迟 | MilliSeconds | 使用自动推理策略进行的验证的延迟 | 

您可以根据下表在 CloudWatch 控制台中查看护栏尺寸：

**维度**


| 维度名称 | 维度值 | 适用于以下指标 | 
| --- | --- | --- | 
| 操作 | ApplyGuardrail |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/bedrock/latest/userguide/monitoring-guardrails-cw-metrics.html)  | 
| GuardrailContentSource |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/bedrock/latest/userguide/monitoring-guardrails-cw-metrics.html)  |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/bedrock/latest/userguide/monitoring-guardrails-cw-metrics.html)  | 
| GuardrailPolicyType |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/bedrock/latest/userguide/monitoring-guardrails-cw-metrics.html)  |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/bedrock/latest/userguide/monitoring-guardrails-cw-metrics.html)  | 
| GuardrailArn, GuardrailVersion |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/bedrock/latest/userguide/monitoring-guardrails-cw-metrics.html)  |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/bedrock/latest/userguide/monitoring-guardrails-cw-metrics.html)  | 
| FindingType \$1 PolicyArn \$1 PolicyVersion | FindingType \$1 PolicyArn \$1 PolicyVersion |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/bedrock/latest/userguide/monitoring-guardrails-cw-metrics.html)  | 
| FindingType \$1 GuardrailArn \$1 GuardrailVersion | FindingType \$1 GuardrailArn \$1 GuardrailVersion |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/bedrock/latest/userguide/monitoring-guardrails-cw-metrics.html)  | 
| PolicyArn \$1 PolicyVersion | PolicyArn \$1 PolicyVersion |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/bedrock/latest/userguide/monitoring-guardrails-cw-metrics.html)  | 
| GuardrailArn \$1 GuardrailVersion | GuardrailArn \$1 GuardrailVersion |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/bedrock/latest/userguide/monitoring-guardrails-cw-metrics.html)  | 

**获取护栏 CloudWatch 指标**

您可以使用 AWS 管理控制台、CLI 或 AP AWS I 获取护栏指标。 CloudWatch 您可以通过其中一个 AWS 软件开发套件 (SDKs) 或 CloudWatch API 工具来使用 API。 CloudWatch 

中护栏指标的命名空间是。 CloudWatch `AWS/Bedrock/Guardrails`

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

**在控制台中查看护栏指标 CloudWatch **

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

1. 选择 `AWS/Bedrock/Guardrails` 命名空间。