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

Nibbler 616 Reputation points

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

| 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.
2,851 questions
Azure Front Door
Azure Front Door
An Azure service that provides a cloud content delivery network with threat protection.
593 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.
968 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Ryan Hill 26,236 Reputation points Microsoft Employee

    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.