Forum Discussion
How to set up an alert when a server is restarted in Azure
- Oct 13, 2020
cnegroni Hello,
Is this a Windows VM? If so, and if you have telemetry from the VM being captured into an Azure monitor workspace (https://docs.microsoft.com/en-us/azure/azure-monitor/platform/log-analytics-agent) you can query for this based on events reported in the event log: Query for computer start events - Microsoft Tech Community
If this is a Linux VM, there could probably be another way to query for this.
If you don't have metrics being captured from the VM itself using the Azure monitor agent, the only other way to have insight into this is if the VM was started via the portal, command-line, etc. through the Activity log. (See attached image). We could setup a simple alert on this as well if this is what you're after. Hopefully this helps!
cnegroni Hello,
Is this a Windows VM? If so, and if you have telemetry from the VM being captured into an Azure monitor workspace (https://docs.microsoft.com/en-us/azure/azure-monitor/platform/log-analytics-agent) you can query for this based on events reported in the event log: Query for computer start events - Microsoft Tech Community
If this is a Linux VM, there could probably be another way to query for this.
If you don't have metrics being captured from the VM itself using the Azure monitor agent, the only other way to have insight into this is if the VM was started via the portal, command-line, etc. through the Activity log. (See attached image). We could setup a simple alert on this as well if this is what you're after. Hopefully this helps!
CloudyRyan thanks for your answer. I'll use the Activity Log (once it is activated because currently is it not being used in my company).