Log Query – Request errors by host and path - How to exlude paths with containing words

Nibbler 656 Reputation points
2021-02-02T21:38:19.017+00:00

Hi there,

I want to make a Query, on the Application Gateway and Front Door, shwoing 500 errors - but excluding 500 pages and certain pages/paths containing specific words.

Any good takes on how to do this?

Script that is being used on the AFD

AzureDiagnostics
| where ResourceProvider == "MICROSOFT.NETWORK" and Category == "FrontdoorAccessLog"
| where isReceivedFromClient_b == true
| where toint(httpStatusCode_s) >= 500
| extend ParsedUrl = parseurl(requestUri_s)
| summarize RequestCount = count() by Host = tostring(ParsedUrl.Host), Path = tostring(ParsedUrl.Path), StatusCode = httpStatusCode_s
| order by RequestCount desc

Thanks for help.

Azure Monitor
Azure Monitor
An Azure service that is used to collect, analyze, and act on telemetry data from Azure and on-premises environments.
3,315 questions
Azure Front Door
Azure Front Door
An Azure service that provides a cloud content delivery network with threat protection.
690 questions
Azure Application Gateway
Azure Application Gateway
An Azure service that provides a platform-managed, scalable, and highly available application delivery controller as a service.
1,079 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Ryan Hill 28,631 Reputation points Microsoft Employee
    2021-02-08T03:13:47.813+00:00

    Hi @KE1980,

    I think what you may be looking for is | where RequestUri_s !in('<not>'.'<this>','<word'>). See https://learn.microsoft.com/en-us/azure/data-explorer/kusto/query/inoperator for more info.

    Regards,
    Ryan


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.