Search code examples
consul

How to use consul to manage different type of servers


I want to register servers of different project on one consul server. Do we have a method to filter consul members on basis of their "type" or "project"? How do I segregate or filter the result?


Solution

    1. You should setup you consul servers: at least change default ports.
    2. For cli commands you can specify -http-addr. So, for example, with default settings consul members is the same as consul members -http-addr=http://127.0.0.1:8500.