Azure vpn log diagnostics - column 'remoteIP_s'

Andrew Taylor 20 Reputation points
2023-12-20T19:13:26.3833333+00:00

Following this https://learn.microsoft.com/en-us/azure/vpn-gateway/troubleshoot-vpn-with-azure-diagnostics

This query fails to execute due to error in the 'where' operator

"Failed to resolve column or scalar expression named 'remoteIP_s'"

AzureDiagnostics
| where Category == "TunnelDiagnosticLog"
| where remoteIP_s == "123.456.7.8"
| project TimeGenerated, OperationName, remoteIP_s, instance_s, Resource, ResourceGroup
| sort by TimeGenerated asc
Azure VPN Gateway
Azure VPN Gateway
An Azure service that enables the connection of on-premises networks to Azure through site-to-site virtual private networks.
1,795 questions
Azure Virtual Network
Azure Virtual Network
An Azure networking service that is used to provision private networks and optionally to connect to on-premises datacenters.
2,772 questions
{count} votes

Accepted answer
  1. Luis Arias 8,621 Reputation points Volunteer Moderator
    2023-12-20T22:27:42.5566667+00:00

    Hello ,

    That error message “Failed to resolve column or scalar expression named ‘remoteIP_s’” typically indicates that the column remoteIP_s does not exist in the data you are querying.

    So If remoteIP_s field is only present in some of your data (for example, it might be null or not exist in some logs), you could use the column_ifexists function to check if the column exists before trying to filter on it.

    AzureDiagnostics
    | extend remoteIP_s = iif(column_ifexists("remoteIP_s","") == true,"","123.456.7.8")
    | where Category == "TunnelDiagnosticLog"
    | where remoteIP_s == "123.456.7.8"
    | project TimeGenerated, OperationName, remoteIP_s, instance_s, Resource, ResourceGroup
    | sort by TimeGenerated asc
    
    
    

    Could you try that workaround and tell me if this solve your problem.

    Cheers,

    Luis

    1 person found this answer helpful.
    0 comments No comments

0 additional answers

Sort by: Most helpful

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.