AWSCloudTrail 表的查询

有关在 Azure 门户中使用这些查询的信息,请参阅 Log Analytics 教程。 有关 REST API,请参阅查询

每个区域的新用户数

返回每个区域创建的用户的计数。

AWSCloudTrail
| where EventName == "CreateUser"
| summarize count() by AWSRegion

所有 AWS CloudTrail 事件

列出所有 AWS 云跟踪事件。

AWSCloudTrail
| project TimeGenerated, EventName, EventTypeName, UserIdentityAccountId, UserIdentityPrincipalid, UserAgent, UserIdentityUserName, SessionMfaAuthenticated, SourceIpAddress, AWSRegion, EventSource, AdditionalEventData, ResponseElements, SessionIssuerUserName

用户的 AWSCT

用户的 AWS 活动。

// Set v_sessionissuerusername and v_userpid  with the details of the user of interest
let v_sessionissuerusername ="abc";let v_userpid ="AIDxXxXxXxXxXxX";
AWSCloudTrail
| where SessionIssuerUserName == v_sessionissuerusername  or UserIdentityPrincipalid ==v_userpid
| project TimeGenerated, EventName, EventTypeName, UserIdentityAccountId, UserIdentityPrincipalid, UserAgent,     UserIdentityUserName, SessionMfaAuthenticated, SourceIpAddress, AWSRegion, EventSource, AdditionalEventData, ResponseElements, SessionIssuerUserName

AWS 控制台登录

列出 AWS 登录事件。

AWSCloudTrail
| where EventName =~ "ConsoleLogin"
| extend MFAUsed = tostring(parse_json(AdditionalEventData).MFAUsed), LoginResult = tostring(parse_json(ResponseElements).ConsoleLogin)
| summarize Count=count() by UserIdentityAccountId, UserIdentityUserName, MFAUsed, LoginResult