英文:
My service running on a VM is no longer logging App Insights when part of a VMSS
问题
我有一个在运行C# Windows服务的Azure虚拟机,该服务正在愉快地记录遥测数据到应用程序洞察。然而,当它投入使用后,出现了对系统弹性的业务需求,因此我从虚拟机镜像创建了一个包含2个实例的虚拟机规模集(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
答案1
得分: 1
这可能不是因为它在规模集中,而是规模集部署在防火墙后导致流向应用洞察的流量被阻止。
您可以通过允许出站流量在端口443上修复此问题。
但更好的解决方案是在包含您的虚拟机的VNET和应用洞察之间创建一个私有连接。请参见:https://learn.microsoft.com/en-us/azure/azure-monitor/logs/private-link-configure
英文:
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
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论