EventBridge를 사용한 Inventory 이벤트 모니터링 - AWS Systems Manager

EventBridge를 사용한 Inventory 이벤트 모니터링

AWS Systems Manager Inventory 리소스 상태 변경에 대한 응답으로 이벤트를 생성하도록 Amazon EventBridge에서 규칙을 구성할 수 있습니다. EventBridge는 다음과 같은 Inventory 상태 변경에 대한 이벤트를 지원합니다. 모든 이벤트는 최선의 작업을 기반으로 전송됩니다.

특정 인스턴스에 대해 사용자 정의 인벤토리 유형이 삭제됨: 이 이벤트를 모니터링하도록 규칙이 구성된 경우 특정 관리형의 사용자 정의 인벤토리 유형이 삭제될 때 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" } }

모든 인스턴스에 대한 사용자 정의 인벤토리 유형이 삭제됨: 이 이벤트를 모니터링하도록 규칙이 구성된 경우 모든 관리형 노드의 사용자 정의 인벤토리 유형이 삭제될 때 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 호출: 이 이벤트를 모니터링하도록 규칙이 구성된 경우 현재 스키마보다 낮은 스키마 버전을 사용하는 PutInventory 호출이 수행될 때 EventBridge가 이벤트를 생성합니다. 이 이벤트는 모든 인벤토리 유형에 적용됩니다. 다음은 샘플 이벤트 패턴입니다.

{ "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 구성 섹션을 참조하세요.