Configuring alert rules for your Virtual Machine Scale Sets (VMSS) in the Azure portal

AnuragSingh-MSFT 21,076 Reputation points
2024-06-27T17:15:09.1366667+00:00

How to configure alert rules for your Virtual Machine Scale Sets (VMSS) in the Azure portal?

What should be the correct scope and dimension for metric alerts?

Azure Monitor
Azure Monitor
An Azure service that is used to collect, analyze, and act on telemetry data from Azure and on-premises environments.
2,960 questions
Azure Virtual Machine Scale Sets
Azure Virtual Machine Scale Sets
Azure compute resources that are used to create and manage groups of heterogeneous load-balanced virtual machines.
360 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Jackson Martins 10,126 Reputation points MVP
    2024-06-27T17:22:10.1366667+00:00

    Hi @AnuragSingh-MSFT
    There is no right or wrong way to configure monitoring; it depends on each application.

    What is recommended is to scale up quickly (two instances at a time) and scale down slowly, shutting down one instance at a time.

    If the application consumes a lot of memory, a good metric is to set an alert at 70% memory usage and start scaling up the VMs at 75% memory usage.

    To configure you can go

    1. In the VMSS pane, select "Alerts" under the "Monitoring" section.
    2. Click on "New alert rule".
    3. In the "Create alert rule" page, the scope is automatically set to the VMSS you've selected. The scope defines the target resource(s) for the alert.
    4. Click on "Add condition".
    5. In the "Select a signal" pane, choose the metric or log signal you want to base your alert on (e.g., CPU usage, Memory usage, Disk I/O, etc.).
    6. Click on "Add action group" to define what happens when an alert is triggered.
    7. Configure the action group by providing a name, short name, and selecting the necessary actions (e.g., email, SMS, webhook, etc.).

    Reference: https://video2.skills-academy.com/en-us/azure/virtual-machine-scale-sets/virtual-machine-scale-sets-faq#how-do-i-set-alert-rules-on-a-virtual-machine-scale-set-

    Get in touch if you need more help with this issue.

    --please don't forget to "[Accept the answer]" if the reply is helpful--