本文属于机器翻译版本。若本译文内容与英语原文存在差异,则一律以英文原文为准。
使用 Amazon 监控 OpenSearch 无服务器事件 EventBridge
亚马逊 OpenSearch 服务与亚马逊集成 EventBridge ,可通知您某些影响您域名的事件。来自 AWS 服务的事件几乎是实时的。 EventBridge 同样的事件也会发送到亚马逊 CloudWatch 的前身 Amazon Events EventBridge。您可以编写规则来指示您关注的事件,并指示要在事件匹配规则时执行的自动化操作。可自动激活的操作示例如下:
-
调用函数 AWS Lambda
-
调用 Amazon EC2 Run Command
-
将事件中继到 Amazon Kinesis Data Streams
-
激活 AWS Step Functions 状态机
-
通知 Amazon SNS 主题或 Amazon SQS 队列
有关更多信息,请参阅《亚马逊 EventBridge 用户指南》 EventBridge中的 “亚马逊入门”。
设置通知
当 OpenSearch 无服务器事件发生时,您可以使用AWS 用户通知来接收通知。事件是 OpenSearch 无服务器环境变化的指标,例如当你达到 OCU 使用量的最大限制时。 Amazon EventBridge 接收事件并将通知发送到 AWS 管理控制台 通知中心和您选择的配送渠道。当事件与指定的规则匹配时,会收到通知。
OpenSearch 计算单位 (OCU) 事件
OpenSearch 当发生以下事件之一 EventBridge 时,Serverless 会将 OCU-related 事件发送到。
OCU 使用量接近最大限制
OpenSearch 当您的搜索或索引 OCU 使用率达到容量限制的 75% 时,Serverless 会发送此事件。您的 OCU 使用量是根据您配置的容量限制和当前的 OCU 消耗量计算得出的。
示例
以下是该类型的示例事件(搜索 OCU):
{ "version": "0", "id": "01234567-0123-0123-0123-012345678901", "detail-type": "OCU Utilization Approaching Max Limit", "source": "aws.aoss", "account": "123456789012", "time": "2016-11-01T13:12:22Z", "region": "us-east-1", "resources": ["arn:aws:es:us-east-1:123456789012:domain/test-domain"], "detail": { "eventTime" : 1678943345789, "description": "Your search OCU usage is at 75% and is approaching the configured maximum limit." } }
以下是该类型的示例事件(索引 OCU):
{ "version": "0", "id": "01234567-0123-0123-0123-012345678901", "detail-type": "OCU Utilization Approaching Max Limit", "source": "aws.aoss", "account": "123456789012", "time": "2016-11-01T13:12:22Z", "region": "us-east-1", "resources": ["arn:aws:es:us-east-1:123456789012:domain/test-domain"], "detail": { "eventTime" : 1678943345789, "description": "Your indexing OCU usage is at 75% and is approaching the configured maximum limit." }
OCU 使用量已达到最大限制
OpenSearch 当您的搜索或索引 OCU 使用率达到容量限制的 100% 时,Serverless 会发送此事件。您的 OCU 使用量是根据您配置的容量限制和当前的 OCU 消耗量计算得出的。
示例
以下是该类型的示例事件(搜索 OCU):
{ "version": "0", "id": "01234567-0123-0123-0123-012345678901", "detail-type": "OCU Utilization Reached Max Limit", "source": "aws.aoss", "account": "123456789012", "time": "2016-11-01T13:12:22Z", "region": "us-east-1", "resources": ["arn:aws:es:us-east-1:123456789012:domain/test-domain"], "detail": { "eventTime" : 1678943345789, "description": "Your search OCU usage has reached the configured maximum limit." } }
以下是该类型的示例事件(索引 OCU):
{ "version": "0", "id": "01234567-0123-0123-0123-012345678901", "detail-type": "OCU Utilization Reached Max Limit", "source": "aws.aoss", "account": "123456789012", "time": "2016-11-01T13:12:22Z", "region": "us-east-1", "resources": ["arn:aws:es:us-east-1:123456789012:domain/test-domain"], "detail": { "eventTime" : 1678943345789, "description": "Your indexing OCU usage has reached the configured maximum limit." } }