Azure Advisor - Virtual Machine Scale Sets - azure

Out of the box, Azure Advisor includes Cost recommendations for the resource type of Virtual Machines, based on resource utilization.
If I look at them under our subscription they have the following information:
Is there any way to get similar advisory for the Virtual Machine Scale Set resource type? Is there any included out of the box?
Or if I want to get average resource consumption, of let's say CPU percentage of all or individual Virtual Machine instances inside of a Virtual Machine Scale set, to be able to aid in the decision if the SKU of the Virtual Machine Scale Set is appropriate, I need to make a query for this inside of Monitor Logs or similar?
Could one create their own custom made advisories (inside of Azure Advisor, if not - anywhere else?), to get this functionaltiy in place (if it isn't already provided)?
Thanks!

Is there any way to get similar advisory for the Virtual Machine Scale Set resource type? Is there any included out of the box?
As per the Azure Advisor documentation, Advisor provides recommendations for the following resource types:
Application Gateway, App Services, availability sets, Azure Cache, Azure Data Factory, Azure Database for MySQL, Azure Database for PostgreSQL, Azure Database for MariaDB, Azure ExpressRoute, Azure Cosmos DB, Azure public IP addresses, Azure Synapse Analytics, SQL servers, storage accounts, Traffic Manager profiles, and Virtual machines.
Although Azure Advisor also includes your recommendations from Azure Security Center which may include recommendations for additional resource types, this list does not cover cost recommendations for VMSS as of today, AFAIK.
I need to make a query for this inside of Monitor Logs or similar?
To monitor your Virtual machine Scale sets, you can leverage Azure Monitor. The performance views in the VM Insights feature are powered using log analytics queries, offering “Top N”, aggregate, and list views to quickly find outliers or issues in your scale set based on guest level metrics for CPU, available memory, bytes sent and received, and logical disk space used.
You can also deploy the Azure Monitor Application Insights Agent on Azure virtual machine scale sets to enable monitoring for your .NET or Java based web applications and get all the benefits of using Application Insights without modifying your code.
Could one create their own custom made advisories (inside of Azure Advisor, if not - anywhere else?), to get this functionaltiy in place (if it isn't already provided)?
Nope, that is not doable as of today. Azure Advisor is a managed offering that analyzes your resource configuration and usage telemetry and then recommends solutions that can help you optimize your Azure resources. Feel free to share your feedback and ideas here for the Advisor team to evaluate and prioritize.

Related

VM availibilty report in azure

Azure availability report is based on the number of heartbeat alert generated in log analytics workspace. Therefore, low availability in the report doesn't really mean that a VM was unavailable due to issues in a given month. It could be different reasons eg. was switched off/deallocated or only created in the last few days in a given month etc.
any logic to improve this any KQL or new azure solution.
Have you gone through looking for VM insights, does that provide you the information you required?
VM insights can help deliver predictable performance and availability of vital applications by identifying performance bottlenecks and network issues and can also help you understand whether an issue is related to other dependencies.
You can create a dashboard with different possible options of kusto queries that depend on what you are looking for.
Here are the few other examples of Kusto Query
https://learn.microsoft.com/en-us/azure/azure-monitor/logs/examples
https://learn.microsoft.com/en-us/azure/azure-monitor/insights/solution-agenthealth#sample-log-searches
You can even have these additional readings of all possible ways of the information you required.
Visualizing data from Azure Monitor
Monitoring Azure virtual machines with Azure Monitor
Create and share dashboards of Log Analytics data
Quickstart: Monitor an Azure virtual machine with Azure Monitor
Collect data from an Azure virtual machine with Azure Monitor
Overview of VM insights

Azure VM auto scale based on alert

The scenario is as follows:
In company premise, there is a network that consists few machines.
The company has an Azure subscription.
Requirement:
To monitor the company's Network/Machines via Azure
If the company resource goes beyond a threshold limit then trigger alerts. Example, network bandwidth consumption, machine CPU/Memory usage, etc.
When such alerts occur then spin up new virtual machines or VM scale sets in Azure to handle the load.
The purpose is if the machines in on-prem goes above threshold limit then automatically provision VMs in Azure, as there are only few on-prem machines.
Please guide how to implement these use cases?
your question is a little confusing. You mention machines on premises and using Azure to monitor them. You can monitor on premises VMs using Azure but then you mention provisioning new Azure VMs via Scale Sets.
I'm not 100% where your workload is but assuming it is in Azure then if you are using VM Scale Sets it's very easy to scale in and out based on resource utilisation.
This can be configured as described here: https://learn.microsoft.com/en-us/azure/virtual-machine-scale-sets/virtual-machine-scale-sets-autoscale-portal

Azure monitor external systems

I want to monitor external systems using azure monitor. Is it possible?
For example, I have on-prem Linux server with mysql DB, can I monitor the server and its DB like availability, errors,...?
Firstly, you can use “Azure Monitor agent” that is explained here. Would recommend you to use Azure Monitor Log Analytics agent as instructed here. The reason for it is “Azure Monitor Agent” as informed in this section, currently only Azure VMs are supported and on-premises VMs, virtual machine scale sets, Arc for Servers, Azure Kubernetes Service, and other compute resource types are currently not supported.
Next, If you have “Azure Monitor Log Analytics agent on Windows machine” then you may have to check below things:
As explained here, Change Tracking and Inventory requires linking a Log Analytics workspace to your Automation account so I recommend you to double check it. For a definitive list of supported regions, see Azure Workspace mappings. The region mappings don't affect the ability to manage VMs in a separate region from your Automation account.
Follow this troubleshooting steps in your case (i.e., if you don't see any Change Tracking and Inventory results for Windows machines that have been enabled for the feature).
As mentioned here, note that currently Change Tracking and Inventory currently is experiencing the following issue w.r.t Windows environment: Hotfix updates aren't collected on Windows Server 2016 Core RS3 machines.

Azure Auto Scaling

Is there an equivalent functionality in Azure like AWS Auto Scaling Group or GCP Instance Group? All I can find is Azure Virtual Machine Scale Set which always uses load balancer. The closest resource I found is Azure Automation Runbook which a bit more complex for my use case.
I just need to spin up virtual machines based on current vm's health threshold and/or to use it for vertical scaling by simply change the instance type.
You can create an Azure VMSS without a loadbalancer, you may need to assign a pubic IP addresses to your VM which is now available. In your case it sounds like you just want 1 node in the VMSS so you can use AutoScale.
https://learn.microsoft.com/en-us/azure/virtual-machine-scale-sets/virtual-machine-scale-sets-networking#public-ipv4-per-virtual-machine
The equivalent Azure service for AWS Auto Scaling Group or GCP Instance Group is Azure Autoscale.
I'll provide some basic overview on Azure's Autoscale taken from here.
Azure Autoscale supports the most common scaling scenarios based on a
schedule and, optionally, triggered scaling operations based on
runtime metrics (such as processor utilization, queue length, or
built-in and custom counters). You can configure simple autoscaling
policies for a solution quickly and easily by using the Azure portal.
For more detailed control, you can make use of the Azure Service
Management REST API or the Azure Resource Manager REST API. The Azure
Monitoring Service Management Library and the Microsoft Insights
Library (in preview) are SDKs that allow collecting metrics from
different resources, and perform autoscaling by making use of the REST
APIs. For resources where Azure Resource Manager support isn't
available, or if you are using Azure Cloud Services, the Service
Management REST API can be used for autoscaling. In all other cases,
use Azure Resource Manager.
The mentioned article is a great resource.
It also provides information about:
Types of scaling (Vertical Vs Horizontal).
Configure autoscaling for an Azure solution.
How to use Azure Autoscale.
Application design considerations for implementing autoscaling.
Check out also this resource on How to auto scale a cloud service.

How to measure memory consumption in Azure web roles

The Azure management dashboard gives you the possibility to monitor metrics such as CPU utilization, network in/out, response time, among others.
But how can you measure consumption/availability of memory? I am running a web app that is memory intensive, and it is hard for me to gauge which instance types (or number of instances) I should provision without having an understanding of the memory situation across time.
Yes, my service is a web role on Azure cloud services, I am not talking about VMs (IaaS) here.
Thanks
In your Azure project, in the Roles folder you'll find a folder for each of your Roles. If you use the latest version of the SDK you'll find a file called diagnostics.wadcfg. This is where you'll be able to configure Performance Counters, like \Memory\Available Bytes. This file will also allow you to configure the sample rate (ex: every 30 sec) and the scheduled transfer period (how frequently the logs should be transferred to your Storage Account).
Then you can use a tool like the Azure Diagnostics Manager to view memory consumption over time.
More information: Using performance counters in Windows Azure
A way to do this from the Management Console:
On the Configure tab for your web role, in the monitoring section, change level to Verbose.
On the Monitor tab at the bottom, click Add Metrics
With monitoring set to Verbose, the available metrics should include Memory Available.

Resources