r/AzureSentinel • u/SuperHat3637 • Jan 03 '23
Log ingestion query
Pls provide KQL query to find the log ingestion from palo alto firewalls.
1
Jan 03 '23
something like this probably:
let starttime = 30d; let endtime = 1d; let timeframe = 1h; let PrivateIPregex = @'127.|10.|172.1[6-9].|172.2[0-9].|172.3[0-1].|192.168.'; let TimeSeriesData = CommonSecurityLog | where TimeGenerated between (startofday(ago(starttime))..startofday(ago(endtime))) | where DeviceVendor =="Palo Alto Networks" and Activity == "TRAFFIC" | where isnotempty(DestinationIP) and isnotempty(SourceIP) | extend DestinationIpType = iff(DestinationIP matches regex PrivateIPregex,"private" ,"public" ) | where DestinationIpType =="public" | project TimeGenerated, SentBytes,DeviceVendor | make-series TotalBytesSent=sum(SentBytes) on TimeGenerated from startofday(ago(starttime)) to startofday(ago(endtime)) step timeframe by DeviceVendor; TimeSeriesData
1
1
u/rodtrent44 MSFT Official Jan 03 '23
Something like the following. If you remove the remark slashes you can create an Analytics Rule that will alert you when data for Palo Alto stops flowing.
CommonSecurityLog
| where TimeGenerated > ago(2h)
| where DeviceVendor == "Palo Alto Networks"
| where DeviceProduct has "PAN-OS"
| summarize count()
//| where count_ == 0