Forum Discussion
How to Monitoring RAM Size
Hi
You can display, monitor and configuring alerts by using VM Insights
First of all you will need a log analytics workspace .
Once you have deployed the log analytics resource .
Go to your VM blade in Monitoring click on Insights then enable
Next select the log analytics you just create and click on enable
Once your VM is connected you will be able to do some queries .
You can select default queries for virtual machines and run it .
Once the query is completed you can see +New alert rule button .
CLick on it and you will able to configure the condition and the actions ( send to email sms ...)
Health (preview) feature which is also interesting since you can enable directly alerts status.
All of the steps can be automated with powershell
https://github.com/infeeny/VMInsights/blob/master/VMInsights.ps1
Log search Example :
https://docs.microsoft.com/en-us/azure/azure-monitor/insights/vminsights-configure-workspace
https://docs.microsoft.com/en-us/azure/azure-monitor/insights/vminsights-health-overview
- Ramanan16Jan 26, 2021Copper Contributor
Thanks for your time and the details. But, the "Available Memory" metrics will show only the remaining unused Memory on the VM. It will not show the Total Memory on that VM. All i need is if the VM has 16GB RAM, i need to monitor it and should get the alert if the RAM size get upgraded or downgraded.
- ibnmbodjiJan 26, 2021Iron Contributor
Hi
You cannot upgrade the memory without picking a new size for the VM . In this case you can use native administrative signal logic and have condition like this to trigger an alert :
Whenever the Activity Log has an event with Category='Administrative', Signal name='Create or Update Virtual Machine (Microsoft.Compute/virtualMachines)'
With Application Change analysis you can preview and see what was the old and new value for the size