Nomad service health check static IP per node

I have a legacy application that I am deploying onto some hardware (non cloud and not working inside of docker). The application comes up on its own and binds to specific interfaces (I am not trying to bind them to interfaces through nomad).
I am attempting to get the health checks working for the application and have been unable how to dynamically assign the IP based on node that is selected. I was hoping I could just store a k\v pair in consul and pull them out to populate the check but that does not seem to be possible.

Am I missing something simple?

You’re running the application on Nomad but aren’t using Nomad’s networking configuration, but then you’re trying to run it with a service block so that Consul will healthcheck it?

In that case, so long as the interface is the same one that Nomad advertises, you should be able to use service.address_mode = "host" to do this. If that doesn’t work or if I’m just wildly off-base with my understanding of the problem :grinning: , go ahead and post your jobspec.

I had to change the nomad configuration file to register the services on the ethernet interface that this particular service was coming up on. I am going to try to get it to work without a health check of the ‘script’ type and see how that works.

Do you happen to know if there is any work being done to make the service bind to a specific interface (thinking several services could go on any number of different interfaces)?

https://github.com/hashicorp/nomad/issues/646 and https://github.com/hashicorp/nomad/issues/6245 are both issues relating to that notion but I don’t have a timeline on completion for them.