azurevirtual-machineazure-vm-scale-set

My service running on a VM is no longer logging App Insights when part of a VMSS


I have an Azure VM which is running a C# Windows Service which is happily logging telemetry to App Insights. However, when it went live, there was then a business requirement for resilience so I created a VMSS from the VM Image running 2 instances, however when running as a scale set, the service no longer log any telemetry, even though the service is running correctly. If I restore the image as a single VM, it immediately starts logging again.

My assumption is that there is something in the load balancer which is blocking the telemetry. Do I need to set an outbound rule?

Any pointers would be greatly appriciated!

Cheers

James


Solution

  • It is probably not because it is in the scale set, but rather that the scale set is deployed behind a firewall that is causing the traffic to App Insights to be blocked.

    You could fix it by allowing out bound traffic on port 443.

    But a better solution is to create a private link between the VNET containing your VM's and App Insights. See: https://learn.microsoft.com/en-us/azure/azure-monitor/logs/private-link-configure