I'm working with an Azure App Service, and I need to monitor and analyze HTTP traffic.
I want to retrieve the source IP, target IP, and URL name from the AppServiceHTTPLogs table. However, I'm not quite sure how to construct the query for this specific information.
我正在使用Azure应用程序服务,我需要监控和分析HTTP流量。我想从AppServiceHTTPLogs表中检索源IP、目标IP和URL名称。但是,我不太确定如何为这些特定信息构建查询。
Can someone provide an example query for querying the AppServiceHTTPLogs table in Azure Monitor to extract the source IP, target IP, and URL name from HTTP logs?
有人能提供一个示例查询来查询Azure Monitor中的AppServiceHTTPLogs表,以从HTTP日志中提取源IP、目标IP和URL名称吗?
Example : I'm trying to Total Time Taken For API requests from a specific source (let's call it A) to a specific target (let's call it B) within a defined time period. However, I'm having trouble constructing the appropriate query for this task
示例:我正在尝试在定义的时间段内,从特定源(称为a)到特定目标(称为B)的API请求所花费的总时间。但是,我在为该任务构造适当的查询时遇到了问题
更多回答
What is the result you are getting when you query direct AppServiceHTTPLogs
?
当您查询直接的AppServiceHTTPLogs时,得到的结果是什么?
Total Time Taken For Request
请求所花费的总时间
优秀答案推荐
Here's an query to extract your data and also to calculate the total time taken for requests from a specific source to a specific target within time period (replace A and B with the actual source and target IP addresses):
以下是一个查询,用于提取您的数据,并计算在一段时间内从特定源到特定目标的请求所花费的总时间(用实际源和目标IP地址替换a和B):
Complete Logs
完整日志
Query to retrieve the source IP, target IP(SPort), and URL name from the AppServiceHTTPLogs table
查询以从AppServiceHTTPLogs表中检索源IP、目标IP(SPort)和URL名称
AppServiceHTTPLogs
| where CIp == "127.0.0.1" and SPort == "443"
| where TimeGenerated > ago(1d)
| project CIp, SPort, CsUriQuery, TimeTaken
| summarize TotalTimeTaken = sum(TimeTaken) by CIp, SPort, CsUriQuery
Result
后果
更多回答
Why do we need a port number for the destination? I want to establish a connection from A to B, where A's IP is 123.323.32 and B's IP is 323.32.3.3. i don't have idea about why we get consider port as destination. i need destinaion consider as my destination ip
为什么我们需要目的地的端口号?我想建立一个从a到B的连接,其中a的IP是123.323.32,B的IP是323.32.3.3。我不知道为什么我们会把港口作为目的地。我需要将destination视为我的目的地ip
我是一名优秀的程序员,十分优秀!