To see custom metrics for a VM in Azure, you're correct that the Azure Monitor agent needs to be installed on the VM and ensure that the VM has outbound internet access to communicate with Azure Monitor. Here are the general steps to install the Azure Monitor agent on a Windows or Linux Azure VM:
Download the Agent:
Download the Agent: