Oct 13 2020 09:19 AM - last edited on Feb 05 2021 12:32 PM by Eric Starker
Hi, I need to set up some kind of alert or receive an email when a server in Azure is restarted (this typically happens after applying patches to Windows or some other components).
Thank you very much
Oct 13 2020 09:49 AMSolution
Is this a Windows VM? If so, and if you have telemetry from the VM being captured into an Azure monitor workspace (Log Analytics agent overview - Azure Monitor | Microsoft Docs) 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!
Oct 18 2020 05:10 PM
@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).