Alert for VM stopped state

VJ-8370 446 Reputation points
2021-02-02T10:25:53.217+00:00

Hi,

Is there any approach to send alerts for VMs which are in stopped state. We tried VM resource health, but that sends when VM is unavailable/unknown only.

Can someone share an approach where we can efficiently identify stopped VMs [Not Stopped(Deallocated)] so that an appropriate action can be taken.

Regards,
VJ

Azure Monitor
Azure Monitor
An Azure service that is used to collect, analyze, and act on telemetry data from Azure and on-premises environments.
3,364 questions
0 comments No comments
{count} votes

Accepted answer
  1. Stanislav Zhelyazkov 25,311 Reputation points MVP
    2021-02-02T14:48:17.38+00:00

    Hi,
    I assume you want to get notified on VMs that are stopped but not deallocated so you can see which VMs are generating running cost, but they should not. There is nothing by default about this available but Azure Resource Graph contains information for Azure resources thus Azure VMs as well. For Azure VMs it contains the information of the power State. You can build some custom automation in Azure Automation, Logic App or Function app that runs the Resource graph query once a day and sends the information somewhere in case such VMs are found.

    Please "Accept the answer" if the information helped you. This will help us and others in the community as well.


0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.