Azure / Azure/azure-cli

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

Open
#20,629 2 comments 0 reactions 1 assignee Claimed by @kairu-ms View on GitHub
act-observability-squad feature-request Monitor - LogAnalytics
Dominant language
Python
Stars
4.6k
Forks
3.5k
Avg merge
3d 2h
Merged PRs (30d)
60

Description

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

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.