GI CloudTrail アプリケーションのログの収集
このページでは、Gl CloudTrail 用 Sumo アプリケーションのログ収集プロセスの概要とログ収集の設定手順を説明します。
収集プロセスの概要
次の図は、AWS CloudTrail からログを収集して Sumo Logic に配信するプロセスをグラフィックで表しています。
ログの収集の設定
Global Intelligence for AWS CloudTrail のログ収集を設定するには、Sumo Logic AWS CloudTrail Benchmark ページで説明されている手順に従います。
ログ メッセージのサンプル
{"eventVersion":"1.05","userIdentity":{"type":"IAMUser","principalId":"AIDAJK3NPEULWEXAMPLE","arn":"arn:aws:iam::224064EXAMPLE:user/username","accountId":"2240example0808","userName":"Pamelia@example.com"},"eventTime":"2020-01-11 00:42:12+0000","eventSource":"signin.amazonaws.com","eventName":"ConsoleLogin","awsRegion":"us-example","sourceIPAddress":"10.10.10.10","userAgent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.100 Safari/537.36","requestParameters":null,"responseElements":{"ConsoleLogin":"Success"},"additionalEventData":{"LoginTo":"https://us-example.console.aws.amazon...sauthcode=true","MobileVersion":"No","MFAUsed":"Yes"},"eventID":"8fd88195-8576-example-8330cb492604","eventType":"AwsConsoleSignIn","recipientAccountId":"22406424example0808"}
クエリの例
次のサンプル クエリは、[Dashboard 01: Attack Surface Benchmark (ダッシュボード 01. 攻撃対象領域ベンチマーク)] ダッシュボードの [Unique AWS Resource Types (一意の AWS リソース タイプ)] パネルから引用されたものです。
_sourceCategory=Labs/AWS/CloudTrail/Analytics
| json "eventSource", "errorCode" nodrop
| where isBlank(errorCode)
| count_distinct(eventSource) as count
| "ResourcesCount_Service" as benchmarkname
| fillmissing values("ResourcesCount_Service") in benchmarkname
| toInt(count) as count
| infer _category=cloudtrail _model=benchmark
| first(count) as MyCompany, first(lower_limit) as cohort_low, first(median) as cohort_median, first(upper_limit) as cohort_high by benchmarkname