VMSS autoscaling based on Memory usage in RHEL 8

R, Nanda Kumar 0 Reputation points
2023-03-26T12:20:43.1233333+00:00

Is it possible to configure Azure Virtual Machine Scale to perform scaling operations based on memory usage percentage when running RHEL 8 flavour of OS on VMs?

I know scaling based on memory metrics is possible using Azure Diagnostic agent extension if the VMs are running RHEL 6 or 7 Operating systems. We had been doing this in our environment and now we need to upgrade our OS to RHEL8. Unfortunately, Azure diagnostic agent is unsupported on RHEL8 and I'm looking for a way to configure VMSS scaling operations based on memory usage percentage.

I did read about Azure Monitor agent but it doesn't seem have any comprehensive document related to exposing memory metrics for use in Azure VMSS scaling operations.

Thanks !!

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,517 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.
433 questions
{count} votes

1 answer

Sort by: Most helpful
  1. vipullag-MSFT 26,466 Reputation points
    2023-03-29T10:07:05.3766667+00:00

    Hello R, Nanda Kumar

    Welcome to Microsoft Q&A Platform, thanks for posting your query here.

    You are correct that Azure Diagnostic agent extension is unsupported on RHEL8.

    However, you can use the Azure Monitor agent to collect memory metrics for RHEL8 VMs. You can then use these metrics to create autoscale rules for your VMSS. To collect memory metrics using the Azure Monitor agent, you need to install the agent on your VMs and configure it to collect the required metrics. You can then use these metrics to create autoscale rules for your VMSS.

    Once you have collected the memory metrics, you can create autoscale rules based on these metrics. You can use the Azure portal, Azure PowerShell, Azure CLI, or Azure templates to create autoscale rules.

    Alternatively, you can use Telegraf agent for collecting metrics and sending them to Azure Monitor. Once you have configured Telegraf on your RHEL8 VMs, you can use Azure Monitor to collect, analyze, and act on these metrics.

    To configure VMSS scaling operations based on memory usage, you can create a custom Azure Monitor alert rule that triggers when the memory usage percentage exceeds a certain threshold. This alert can then trigger an Azure Automation runbook that adds or removes instances from the VMSS as required.

    Ref: https://learn.microsoft.com/en-us/azure/azure-monitor/essentials/collect-custom-metrics-guestos-resource-manager-vmss

    https://learn.microsoft.com/en-us/azure/azure-monitor/essentials/collect-custom-metrics-linux-telegraf

    Hope that helps.

    0 comments No comments

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.