关于 Inventory 事件的 EventBridge 监控 - AWS Systems Manager

关于 Inventory 事件的 EventBridge 监控

您可以在 Amazon EventBridge 中配置规则来创建事件,以响应 AWS Systems Manager Inventory 资源状态更改。EventBridge 支持针对以下 Inventory 状态更改的事件。将尽最大努力发送所有事件。

Custom inventory type deleted for a specific instance(针对特定实例删除的自定义清单类型):如果配置了用于监控此事件的规则,EventBridge 将在删除特定托管式节点上的自定义清单类型时创建一个事件。EventBridge 将针对每个自定义清单类型的每个节点发送一个事件。以下是一个示例事件模式。

{ "timestampMillis": 1610042981103, "source": "SSM", "account": "123456789012", "type": "INVENTORY_RESOURCE_STATE_CHANGE", "startTime": "Jan 7, 2021 6:09:41 PM", "resources": [ { "arn": "arn:aws:ssm:us-east-1:123456789012:managed-instance/i-12345678" } ], "body": { "action-status": "succeeded", "action": "delete", "resource-type": "managed-instance", "resource-id": "i-12345678", "action-reason": "", "type-name": "Custom:MyCustomInventoryType" } }

Custom inventory type deleted event for all instances(所有实例的自定义清单类型删除事件):如果配置了用于监控此事件的规则,EventBridge 将在删除适用于所有托管式节点的自定义清单类型时创建一个事件。以下是一个示例事件模式。

{ "timestampMillis": 1610042904712, "source": "SSM", "account": "123456789012", "type": "INVENTORY_RESOURCE_STATE_CHANGE", "startTime": "Jan 7, 2021 6:08:24 PM", "resources": [ ], "body": { "action-status": "succeeded", "action": "delete-summary", "resource-type": "managed-instance", "resource-id": "", "action-reason": "The delete for type name Custom:SomeCustomInventoryType was completed. The deletion summary is: {\"totalCount\":1,\"remainingCount\":0,\"summaryItems\":[{\"version\":\"1.1\",\"count\":1,\"remainingCount\":0}]}", "type-name": "Custom:MyCustomInventoryType" } }

PutInventory call with old schema version event (使用旧架构版本事件进行 PutInventory 调用):如果配置了用于监控此事件的规则,EventBridge 将在使用低于当前架构的架构版本进行 PutInventory 调用时创建一个事件。此事件适用于所有清单类型。以下是一个示例事件模式。

{ "timestampMillis": 1610042629548, "source": "SSM", "account": "123456789012", "type": "INVENTORY_RESOURCE_STATE_CHANGE", "startTime": "Jan 7, 2021 6:03:49 PM", "resources": [ { "arn": "arn:aws:ssm:us-east-1:123456789012:managed-instance/i-12345678" } ], "body": { "action-status": "failed", "action": "put", "resource-type": "managed-instance", "resource-id": "i-01f017c1b2efbe2bc", "action-reason": "The inventory item with type name Custom:MyCustomInventoryType was sent with a disabled schema verison 1.0. You must send a version greater than 1.0", "type-name": "Custom:MyCustomInventoryType" } }

有关如何配置 EventBridge 以监控这些事件的信息,请参阅 为 Systems Manager 事件配置 EventBridge