Skip to content

how to use "az monitor log-analytics query" for resource StorageBlobLogs? #20629

@MonikaReddy-MSFT

Description

@MonikaReddy-MSFT

Customer has raised an issue -

I noticed that if I want to run a log-analytics query on StorageBlobLogs like

StorageBlobLogs| where TimeGenerated > ago(1d)

in my log analytics workspace I need to use select scope to switch from resource type log analytics workspace either to my resource group or to storage account.
This is fine for me if using azure web portal. But how to proceed via azure cli using

az monitor log-analytics query --workspace --analytics-query "StorageBlobLogs| where TimeGenerated > ago(1d)'"

This will always result in an empty result and I have no option to select a scope like in the azure portal.
Any hint how to get the same result via az cli like as in azure portal?

https://docs.microsoft.com/en-us/answers/questions/649151/index.html

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions