Answer – B
This can be achieved by using the Application Health extension. The Health extension can actually view and monitor the health of your underlying instances. And then automatically it also performs the required upgrades on your instances.
Option A is incorrect since this can only install custom scripts on the virtual machine.
Option C is incorrect since this is only a monitoring aspect.
Option D is incorrect since this is only used to monitor the health of the underlying instances sitting behind the load balancer.
For more information on the Application Health extension, you can refer to the below link-
https://docs.microsoft.com/en-us/azure/virtual-machine-scale-sets/virtual-machine-scale-sets-health-extension