Hello, I don’t know if this has been asked about before, is there such a thing as URL endpoint that my Azure Load Balancer can hit to check the health of the VM?
right now i’m using a simple healthCheck.html file that’s hosted in IIS, so that if i want to remove the Azure Virtual Machine from the load balancing set, i stop the iis website and it’s removed.
but is there an Octopus Deploy Tentacle version of this that I can use?it needs to respond with HTTP 200 status if the VM is OK and something else if the VM has a problem
Thanks for reaching out! Are you trying to check to overall status of the VM, or of the Tentacle Service (meaning if its possible or not to deploy to it)?
The closest thing we have to such endpoint is the “Status” property of the Tentacle/Target which you can check from our API (/api/machines/all)
I was thinking that you could leverage the Octopus Health Check scheduler and create a Custom Health Check Script that, on top of the default checks, it also monitors other variables that you consider important, and based on that hit the Azure Load Balancer and tell it to remove that VM or simply stop that IIS site.
Thanks for the advise and i’ll definitely check that out right now. The great thing about the Azure Load Balancer is that can be configured to probe an endpoint to see if the whole VM is healthy and willing to participate in the load balanced set as it is actively distributing traffic to it…
I was wondering more along the lines of if Octopus Deploy hosts a healthCheck page on the tentacle such that if all the checks are met (ie, this VM will respond with a healthy website when hit by a client) then the healthCheck page will respond to the load balancer probe with a 200 OK html page.
With the way the Azure Load Balancer is designed to test every web server before a page comes through to the back end address pool, if a web server fails, or for example can’t contact the Database, the probe endpoint could respond to the Azure Load Balancer probe with a 500 status and the probe will know instantly that this VM is unhealthy.
I was wondering more along the lines of if Octopus Deploy hosts a healthCheck page on the tentacle such that if all the checks are met (ie, this VM will respond with a healthy website when hit by a client) then the healthCheck page will respond to the load balancer probe with a 200 OK html page.
The closest thing Octopus can offer you to a Health Endpoint is the “Status” property of the machine, which changes depending on the results of the Health Check task.
I was thinking you could build a small website that when hit for a specific machine (http://MyHealthCheckApp/health/Machine1) It’ll ask the Octopus API for the status of that machine and if its not “Online” It’ll return a non-200 HTTP code.