Checking for node liveness

I need to check for node liveness in order to integrate with my service discovery tools. How can I do that?

** Note: this is a copy of a community asked question on a different communication channel

You can hit the /health endpoint that will return an error if the node is dead.