Forum Discussion
uditk14
Jun 18, 2020Copper Contributor
Is there a way to find total Virtual machines using Azure logs
I want to collect data for all the VMs present. But I am able to use only VMComputer and Heartbeat table for this. It doesn't has the data for the VMs which are in shut down state. I need data for all the VMs using log analytics.
- GaryBusheyBronze Contributor
uditk14 What data are you talking about obtaining? You will not be able to get any data from any of the monitoring agents if the VM is not running. You can have some VM Diagnostic settings get pushed to Azure Sentinel if there is any data in those that may be useful
- uditk14Copper Contributor
GaryBushey - I would like to fetch the AzureSize, AzureLocation, Physical Memory for all the VMs
- CliveWatsonMicrosoft
Some of that data is available in other Tables or from Metrics / API. See example Workbook here which uses Metrics
AzureActivity logs would help you, if you can add those?
If not you'll have to use something like a Workbook, pull data from the api or ARG (Azure resourceGraph) and merge with Heartbeat. A bit like this: