Share via


AKSAuditAdmin 數據表的查詢

每個用戶名稱的管理 Kubernetes 稽核事件數量

顯示從每個 AKS 叢集指定使用者名稱產生的管理員 Kubernetes 稽核事件計數。 需要診斷設定才能使用資源特定目的地數據表。

AKSAuditAdmin
| where ResponseStatus.code != 401  // Exclude unauthorized responses
| summarize Count = count() by Username = tostring(User.username), ResourceId = _ResourceId
| sort by Count desc

管理員 Kubernetes 稽核部署事件

針對預設命名空間內的部署查詢管理員 Kubernetes 稽核事件。 需要診斷設定才能使用資源特定目的地數據表。

AKSAuditAdmin
| where ObjectRef.resource == "deployments"
| where ObjectRef.namespace == "default"
| where User.username != "system:serviceaccount:kube-system:deployment-controller" // Exclude updates from the kube controller for deployments
| limit 100
| project TimeGenerated, Verb, RequestUri, User, RequestObject, ObjectRef