CloudWatch Contributor Insights ルールの例 - Amazon CloudWatch

CloudWatch Contributor Insights ルールの例

このセクションには、Contributor Insights ルールのユースケースを示す例が含まれています。

VPC フローログ: 送信元 IP アドレスおよび送信先 IP アドレスごとのバイト転送

{ "Schema": { "Name": "CloudWatchLogRule", "Version": 1 }, "LogGroupNames": [ "/aws/containerinsights/sample-cluster-name/flowlogs" ], "LogFormat": "CLF", "Fields": { "4": "srcaddr", "5": "dstaddr", "10": "bytes" }, "Contribution": { "Keys": [ "srcaddr", "dstaddr" ], "ValueOf": "bytes", "Filters": [] }, "AggregateOn": "Sum" }

VPC フローログ: HTTPS リクエストの最高数

{ "Schema": { "Name": "CloudWatchLogRule", "Version": 1 }, "LogGroupNames": [ "/aws/containerinsights/sample-cluster-name/flowlogs" ], "LogFormat": "CLF", "Fields": { "5": "destination address", "7": "destination port", "9": "packet count" }, "Contribution": { "Keys": [ "destination address" ], "ValueOf": "packet count", "Filters": [ { "Match": "destination port", "EqualTo": 443 } ] }, "AggregateOn": "Sum" }

VPC フローログ: 拒否された TCP 接続

{ "Schema": { "Name": "CloudWatchLogRule", "Version": 1 }, "LogGroupNames": [ "/aws/containerinsights/sample-cluster-name/flowlogs" ], "LogFormat": "CLF", "Fields": { "3": "interfaceID", "4": "sourceAddress", "8": "protocol", "13": "action" }, "Contribution": { "Keys": [ "interfaceID", "sourceAddress" ], "Filters": [ { "Match": "protocol", "EqualTo": 6 }, { "Match": "action", "In": [ "REJECT" ] } ] }, "AggregateOn": "Sum" }

送信元アドレスによる Route 53 NXDomain 応答

{ "Schema": { "Name": "CloudWatchLogRule", "Version": 1 }, "AggregateOn": "Count", "Contribution": { "Filters": [ { "Match": "$.rcode", "StartsWith": [ "NXDOMAIN" ] } ], "Keys": [ "$.srcaddr" ] }, "LogFormat": "JSON", "LogGroupNames": [ "<loggroupname>" ] }

ドメイン名による Route 53 Resolver クエリ

{ "Schema": { "Name": "CloudWatchLogRule", "Version": 1 }, "AggregateOn": "Count", "Contribution": { "Filters": [], "Keys": [ "$.query_name" ] }, "LogFormat": "JSON", "LogGroupNames": [ "<loggroupname>" ] }

クエリタイプと送信元アドレスによる Route 53 Resolver クエリ

{ "Schema": { "Name": "CloudWatchLogRule", "Version": 1 }, "AggregateOn": "Count", "Contribution": { "Filters": [], "Keys": [ "$.query_type", "$.srcaddr" ] }, "LogFormat": "JSON", "LogGroupNames": [ "<loggroupname>" ] }