Hi @RicardoAnselmoOliveira-7430 ,
where are you executing the Azure CLI? In the portal or on your computer?
Not sure if it's just a typo: --output tsv | Export-Csv -Path "C:...test.csv"
If you choose tsv
format for output you can't export this with Export-Csv
Does this work?
az monitor log-analytics query -w 1f(...) --analytics-query "let top5Containers= KubePodInventory |extend MyName = tostring(split(ContainerName,'/')[1]) |extend InstanceName=strcat(ClusterId,'/',PodUid,'/',MyName) (...) ;" --output tsv >"C:...test.tsv"
Another option might be:
az monitor log-analytics query -w 1f(...) --analytics-query "let top5Containers= KubePodInventory |extend MyName = tostring(split(ContainerName,'/')[1]) |extend InstanceName=strcat(ClusterId,'/',PodUid,'/',MyName) (...) ;" --output tsv | Export-Csv -Path "C:...test.csv" -Delimiter "`t"
----------
(If the reply was helpful please don't forget to upvote and/or accept as answer, thank you)
Regards
Andreas Baumgarten