Forum Discussion

cnegroni's avatar
cnegroni
Copper Contributor
Oct 13, 2020
Solved

How to set up an alert when a server is restarted in Azure

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

 

Regards

 

Carlos Negroni

 

  • 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!

2 Replies

  • CloudyRyan's avatar
    CloudyRyan
    Brass Contributor

    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's avatar
      cnegroni
      Copper Contributor

      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).

       

Resources