azure-cli-extensions
azure-cli-extensions copied to clipboard
az monitor app-insights with --output gives no output
Describe the bug
az monitor app-insights
with --output
provides no output, while without --output
it works fine.
Example command that works:
$ az monitor app-insights query -g resource -a name --analytics-query "requests | where url contains '.servicebus.windows.net/t_'" --start-time "2022-02-01" --offset 30d | wc -l
28629
Example that doesn't work
$ az monitor app-insights query -g resource -a name --analytics-query "requests | where url contains '.servicebus.windows.net/t_'" --start-time "2022-02-01" --offset 30d --output table | wc -l
1
Command Name
az monitor app-insights query Extension Name: application-insights. Version: 0.1.15.
To Reproduce:
Run az monitor app-insights query
with --output
Expected Behavior
Get output in the specified output
Environment Summary
Linux-5.10.0-11-amd64-x86_64-with-debian-11.2, Debian GNU/Linux 11 (bullseye)
Python 3.6.10
Installer: DEB
azure-cli 2.33.1
Extensions:
application-insights 0.1.15
Dependencies:
msal 1.16.0
azure-mgmt-resource 20.0.0
monitor
Hi, 'az monitor app-insights query -- --output json/yaml 'works well , notice that when the query command with --output table has no results , the result will be in the form of blank. Best wishes.
Thanks @YuanyuanNi I've noticed that --output table results in an empty result if there are no rows. I tested this with a query that /does/ provide a result, so i expect --table to NOT be empty...
Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @SameergMS, @dadunl.
Issue Details
Describe the bug
az monitor app-insights
with --output
provides no output, while without --output
it works fine.
Example command that works:
$ az monitor app-insights query -g resource -a name --analytics-query "requests | where url contains '.servicebus.windows.net/t_'" --start-time "2022-02-01" --offset 30d | wc -l
28629
Example that doesn't work
$ az monitor app-insights query -g resource -a name --analytics-query "requests | where url contains '.servicebus.windows.net/t_'" --start-time "2022-02-01" --offset 30d --output table | wc -l
1
Command Name
az monitor app-insights query Extension Name: application-insights. Version: 0.1.15.
To Reproduce:
Run az monitor app-insights query
with --output
Expected Behavior
Get output in the specified output
Environment Summary
Linux-5.10.0-11-amd64-x86_64-with-debian-11.2, Debian GNU/Linux 11 (bullseye)
Python 3.6.10
Installer: DEB
azure-cli 2.33.1
Extensions:
application-insights 0.1.15
Dependencies:
msal 1.16.0
azure-mgmt-resource 20.0.0
Author: | cyclops1982 |
---|---|
Assignees: | kairu-ms |
Labels: |
|
Milestone: | Backlog |
Hi, The --output table here are different with the common table we think .As the output is an object , so CLI does not support this command to output in the form of table. Best wishes.
I am facing the same issue. Is there any workaround to convert to CSV, at least?