Skip to content

az monitor log-analytics query is very picky about kusto queries #5147

Open

Description

$query = 'AzureDiagnostics | where action_s == "Blocked" | count'

$w = 'valid--id'

Invoke-AzOperationalInsightsQuery -WorkspaceId $w -Query $query -ErrorAction Stop -Timespan (New-TimeSpan -Hours 2)| Select-Object -ExpandProperty Results --> produces
Count

123

'az monitor log-analytics query -w $w --analytics-query $query -t PT3H ' produces -> BadArgumentError: The request had some invalid properties

its a valid kusto query. the powershell cmdlet produces a result. az cli breaks.

Why?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

Labels

Auto-AssignAuto assign by botAzure CLI TeamThe command of the issue is owned by Azure CLI teamMonitorcustomer-reportedIssues that are reported by GitHub users external to the Azure organization.feature-requestThis issue requires a new behavior in the product in order be resolved.

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions