Let's say I have an Azure VM and there's a process called ABC.exe and it listens on port 34952. I want to monitor this port and perform some sort of health probe check for it. If it goes down, I want to be alerted.
I looked into using Log Analytics Workspace, as you can create an Alert rule for it. Something like this:
VMConnection
| where Direction == "inbound"
| where ProcessName == "ABC.exe"
| where DestinationPort in (34952)
| where LinksFailed > 0
The problem is, the "LinksFailed" metric is only available for Outbound connections, not Inbound. This is documented here - https://learn.microsoft.com/en-us/azure/azure-monitor/reference/tables/vmconnection
Otherwise, the above works well for identifying any failed links for specific ports and their processes.
Is there another option I can use? I'm trying not to implement any solutions at the VM guest level. Ideally, if this can be done at the PaaS level, that would be great.