Hi Tajman Kaur
Thanks for reaching out to Microsoft Q&A.
You can first enable VM insights and send logs to Log analytics workspace
https://learn.microsoft.com/en-us/azure/azure-monitor/vm/vminsights-enable?tabs=portal
Monitor your performance metrics as per guidelines here - https://learn.microsoft.com/en-us/azure/azure-monitor/vm/vminsights-performance
And then you can create alerts - https://learn.microsoft.com/en-us/azure/azure-monitor/vm/monitor-virtual-machine-alerts
Example- Available memory in percentage
KustoCopy
InsightsMetrics
| where Origin == "vm.azm.ms"
| where Namespace == "Memory" and Name == "AvailableMB"
| extend TotalMemory = toreal(todynamic(Tags)["vm.azm.ms/memorySizeMB"]) | extend AvailableMemoryPercentage = (toreal(Val) / TotalMemory) * 100.0
| summarize AvailableMemoryInPercentageAverage = avg(AvailableMemoryPercentage) by bin(TimeGenerated,
Please do not forget to "Accept the answer” and “up-vote” wherever the information provided helps you, this can be beneficial to other community members.