Microsoft Azure VM - Enabling Azure Monitor Agent for Windows & Linux VMs
Purpose of Diagnostics Agent and Azure Monitor Agent
Additional metrics from Azure Virtual Machine can be fetched via
Diagnostic Extensions (DE) or
Azure Monitor Agent (AMA). In Diagnostic Extensions, data is pushed to
Azure Storage Account to which Applications Manager connects for fetching data. In Azure monitor agent, data is pushed to
Azure Monitor (native Azure monitoring service) by configuring
Data Collection Rule, whereas storing data in Storage Accounts (legacy approach) is avoided
.Why Azure Monitor Agent?
- Diagnostic Extensions requires firewall access and may require to enable private endpoint to fetch the metrics from storage accounts and may encounter issues in retrieving data & managing the associated storage costs.
- Until Applications Manager v171300 we relied on Diagnostics Extensions (DE), but starting from Applications Manager v171400 we also support Azure Monitor Agent (AMA) to overcome these limitations.
- Refer to this document to know about the agent supported for different server distributions.
Summary of Azure Monitor Agent Configuration
- In Azure Portal, create Data Collection Rule
- Select Platform Type based on the OS type.
- Add respective VM under the Resources.
- Select the metrics listed in the below Windows Metrics Mapper Table or Linux Metrics Mapper Table as Data Source based on the OS type.
- Deploy the Data Collection Rule and ensure the Agent is installed.
- In Applications Manager, select Azure Monitor Agent as the Agent Type in the Edit Monitor Page.
Detailed Steps to enable Azure Monitor Agent in Azure Portal
- Log in to Azure Portal (https://portal.azure.com).
- Navigate to 'Data collection rules' using search bar and create a new resource under it for agent installation.
- Create a new Data Collection Rule
- In Basics tab, Select Platform Type as 'Windows' or 'Linux' or 'All' based on the respective virtual machine OS type.
- In Resources tab, click on 'Add resources' and select the respective Virtual machines.
- In Collect and deliver tab, click on 'Add data source' and select the Data source type as Performance Counters.
Under Performance Counters, all the listed categories of
Basic are chosen by default
, and the metrics monitored in Applications Manager are included in it. If the user wants to enable agent only for APM monitored metrics, switch to
Custom and select the metrics listed in the below table
Windows Metrics Mapper Table or
Linux Metrics Mapper Table based on the OS type.
In Destination, click 'Add destination' and Specify destination type as Azure Monitor Metrics (preview). After that, click on 'Add data source'.
- Proceed to click on 'Review + create' and review the configurations & click 'Create' to deploy the resource for agent installation.
- Confirm the status of the installed agent is Provisioning succeeded.
- Navigate to the respective virtual machine and ensure the virtual machine is in Running state. Then select Extensions + applications under 'Settings' in the Left Panel.
- Ensure the status is 'Provisioning succeeded' for AzureMonitorWindowsAgent (or) AzureMonitorLinuxAgent based on OS type of the VM.
If agent status is not in succeeded state, please check the
troubleshooting steps.
- Ensure the metrics are added under Azure Monitor Metrics.
- In the respective virtual machine, select Metrics under Monitoring in the Left Panel.
- Click on 'Add metric' and select 'Metric Namespace' as Virtual Machine Guest for Windows (or) azure.vm.linux.guestmetrics for Linux.
- Verify whether all the Applications Manager supported metrics are listed under 'Metric' list.
Windows Metrics Mapper Table
Metric Name in Azure Portal
| Metric Name in Applications Manager
|
\Processor Information(_Total)\% Privileged Time | |
\Processor Information(_Total)\% User Time | |
\Processor Information(_Total)\Processor Frequency | |
| |
| |
\Memory\% Committed Bytes In Use | |
| |
\Memory\Pool Nonpaged Bytes | |
| |
\Process(_Total)\Thread Count | |
\System\Context Switches/sec | |
| |
\Process(_Total)\Handle Count | |
Linux Metrics Mapper Table
Metric Name in Data Collection Rule | Metric Name in Azure Monitor Metrics | Metric Name in Applications Manager |
Processor(*)\% IO Wait Time | | |
| | |
Processor(*)\% Processor Time | | Processor Time(Linux) (%) |
Memory(*)\% Used Memory | | |
Memory(*)\Available MBytes Memory | | |
Memory(*)\Used Memory MBytes | | |
Memory(*)\% Available Memory | | |
Memory(*)\% Used Swap Space | | |
To know about the list of metrics supported for Azure Virtual Monitor under all methods please refer this
help document.
Memory Utilization metric in Azure Linux Virtual Machine monitors is supported only for 'Azure monitor agent' agent type from Applications Manager v171900.
Enabling Azure Monitor Agent in Applications Manager
- Navigate to the respective virtual machine monitor in Applications Manager and click on edit monitor page. Ensure the Agent Type is selected as Azure monitor agent.
- By default Agent Type will be opted as 'Azure monitor agent' and for existing monitors before the v171400 Agent Type will be Diagnostic agent.
For Azure Government Cloud VM monitors, 'Azure monitor agent' agent type is not supported and by default 'Diagnostic agent' will be selected.
Troubleshoot: AM Agent not in Provisioning succeeded state
Ensure Python 2 is installed in respective virtual machine. Refer to documentation for Python installation procedures. In the respective virtual machine, under Extensions + Applications, if the Status of AzureMonitorWindowsAgent or AzureMonitorLinuxAgent is not 'Provisioning succeeded', click on the agent and review the Status message . Take necessary actions as indicated in the message. Example: Installing required packages to ensure proper configuration. Refer documentation to know the requirements for Agent installation.
- Diagnostic Extension is now considered a legacy approach and it is limited to some server distributions. It is recommended to switch to Azure Monitor Agent (AMA).
- In Applications Manager to fetch agent metrics for Azure Virtual Machine monitor using 'Diagnostics agent', Contributor role is required. Whereas for 'Azure monitor agent' Reader role is sufficient to fetch data.
- From Applications Manager v171400, Azure monitor agent is supported. Refer help documentation to know more.
New to ADSelfService Plus?
Related Articles
Microsoft Azure VM - Enabling Diagnostics extension for Windows & Linux VMs
Diagnostic Extension is now considered a legacy approach and it is limited to some server distributions. It is recommended to switch to Azure Monitor Agent (AMA). From Applications Manager v171400, Azure monitor agent is supported. Refer here to know ...
Microsoft Azure VM (Windows) - Powershell Remoting Failure
To resolve the issue, follow the steps given below: Go to Monitor Actions -> Edit Monitor page and check if Enable Guest OS Monitoring option is enabled. Verify if the Username and Password are correct. Verify whether all the prerequisites are done ...
Self monitor Applications Manager using APM Insight Java Agent
Applications Manager is built with Java, hence we can monitor it using APM Insight Java Agent to measure it's performance continuously, which can be very much useful. Setting up APM Insight Java Agent Follow the below steps to download and set up the ...
Microsoft Azure - FAQ
1. What happens to the Azure monitor in Applications Manager when you delete any of the supported services from the Azure portal? When you perform a delete operation on any of the supported Azure resources in the Azure portal, the respective monitor ...
Azure Virtual Machine - FAQ
1. How is data collection happening for Azure Virtual Machine monitors? Microsoft Azure monitor discovery modes in AppManager: AD Application mode Organizational Account mode OAuth mode Azure VM monitor - Data collection methods: Azure Monitor Azure ...