Forum Discussion

JMSHW0420's avatar
JMSHW0420
Iron Contributor
Oct 07, 2023
Solved

How to measure egress for Storage Account and whether it has exceeded x GiB in y minutes?

Hello,   I am trying to find a KQL query that can scan any Storage Account and verify, through an alert metric, whether it has exceeded x GiB in y minutes.   I know it is possible to set up an al...
  • JMSHW0420's avatar
    JMSHW0420
    Oct 10, 2023
    Hi Clive,

    The below query actually provides the solution I require.

    StorageBlobLogs
    | where TimeGenerated between ( startofday(ago(2d)) .. endofday(ago(1d)) )
    | where OperationName == "GetBlob"
    | extend IPAddress = tostring(split(CallerIpAddress,':')[0])
    | join
    (
    SigninLogs
    | where isnotempty(IPAddress)
    )
    on IPAddress
    | summarize ReadSize = sum(ResponseBodySize) by AccountName, UserPrincipalName, bin(TimeGenerated, 6hr)
    | where ReadSize > 10000

    Thanks for your help.