Can a full url be specified in the request line property of a health check in rancher-compose.yml? Something like this:
request_line: GET http://host:18080/integration-server/agents/health/check HTTP/1.0
In this case host is a service alias to a service on another stack.
The request is going to the container(s) of the target service and the port defined in the health check. You can set the Host header though if you change the version to HTTP/1.1, which may be what you’re actually trying to do…
Can you expand on that answer, its very unclear to me on where / how the host header could be set. I’ve looked through rancher-compose example and found a schema here: https://github.com/rancher/rancher-compose-executor/blob/master/config/schema.go, but nothing seems to indicate that header modifications are possible.
Our system has been designed so that this service is essentially just a consumer of messages from jms. It has no ports open, and thus nothing to check. As such we have coded an intermediate service that can query the state of this service and thats what i want to rely on. Hope this helps you to understand what I am looking to achieve.
Does anyone understand where this header could be set?
You put a cr/lf in the request line and then the header, as is traditional in HAProxy. If you don’t know how to do something, doing it in the UI and looking at the generated compose file is usually a good start.
GET /integration-server/agents/health/check HTTP/1.1