Thank you for reaching out to the Microsoft Q&A platform.
As suggested by Sedat Salman, to extract CPU and memory utilization data of all Azure VMs across subscriptions for the last 3 months, you can use Azure Monitor. Azure Monitor provides a centralized platform for collecting, analyzing, and acting on telemetry data from Azure resources, including VMs.
Here are high level steps you can follow:
- Enable Azure Monitor for your subscriptions if it is not already enabled. You can do this by going to the Azure portal, selecting "Monitor" from the left-hand menu, and following the prompts to enable Azure Monitor.
- Configure Azure Monitor to collect performance data for your VMs. You can do this by going to the Azure portal, selecting "Monitor" from the left-hand menu, selecting "Virtual machines" under "Monitoring solutions", and following the prompts to configure performance data collection.
- Once you have configured performance data collection, you can use Azure Monitor to query the data for the last 3 months. You can do this by going to the Azure portal, selecting "Monitor" from the left-hand menu, selecting "Metrics" under "Monitoring data", and selecting the appropriate subscription and VM resource type.
- From there, you can select the appropriate metrics, such as "Percentage CPU" and "Memory Usage" and set the time range to the last 3 months.
- You can then export the data to a CSV file for further analysis.
Note that Azure Monitor has some limitations, such as a maximum data retention period of 90 days. If you need to retain data for longer than 90 days, you may need to use a third-party monitoring solution or export the data to a storage account for long-term retention.
Reference: https://learn.microsoft.com/en-us/azure/azure-monitor/overview
Please click "Accept as answer" if this helps.