I find the consul catalog command to be lacking for my needs, and I’m wondering if its possible to add columns to get extra data like actual instance name or tags? Perhaps can the instance register itself as multiple names or aliases? Not sure, so I’d love to know if there’s a way to do more with this.
[ec2-user@ip-10-1-0-78 ~]$ consul catalog nodes
Node ID Address DC
i-00190d5040e703f9b 5b3f8270 10.1.128.12 ap-southeast-2
i-025362e0cdd0b7131 3057bcf6 10.1.0.133 ap-southeast-2
i-03e23243b90a6fe29 d8b46ec5 10.1.0.138 ap-southeast-2
i-05447c172cd3378f7 9f8da777 10.1.0.139 ap-southeast-2
i-089bf3f2b302d137d 865645ed 10.1.0.140 ap-southeast-2
Hi @queglay you can get more information if you use the flag -detailed
. But to gather the most information we recommend using the API, more specifically the catalog node endpoint.
Below is an example of using the -detailed
flag.
consul catalog nodes -detailed
Node ID Address DC TaggedAddresses Meta
consul_server_0 0008b15f-c876-3ac3-8da1-6250da4aec96 10.5.0.2 dc1
consul_server_1 cd8bd8f6-2312-68c8-693c-a2863bf043c4 10.5.0.3 dc1
consul_server_2 d4ab9981-11e1-7f2e-0bbc-9261cc5df178 10.5.0.4 dc1
frontend-0 f47691d5-078a-5df0-bdee-ecc84350b8c0 10.5.0.5 dc1 lan=10.5.0.5, lan_ipv4=10.5.0.5, wan=10.5.0.5, wan_ipv4=10.5.0.5 consul-network-segment=
payments0 c704691e-ac94-facd-4e34-481391eecb33 10.5.0.9 dc1 lan=10.5.0.9, lan_ipv4=10.5.0.9, wan=10.5.0.9, wan_ipv4=10.5.0.9 consul-network-segment=
product-api0 014c843f-8e7d-4b18-78f6-46b11927e542 10.5.0.7 dc1 lan=10.5.0.7, lan_ipv4=10.5.0.7, wan=10.5.0.7, wan_ipv4=10.5.0.7 consul-network-segment=
product-db-0 e52aad0c-f4b8-add9-5037-babb7db987c7 10.5.0.8 dc1 lan=10.5.0.8, lan_ipv4=10.5.0.8, wan=10.5.0.8, wan_ipv4=10.5.0.8 consul-network-segment=
public-api-0 97ee69d9-91d1-6004-4143-b38b5f863656 10.5.0.6 dc1 lan=10.5.0.6, lan_ipv4=10.5.0.6, wan=10.5.0.6, wan_ipv4=10.5.0.6 consul-network-segment=