hashicorp / hashicorp/consul

Consul monitor command should support forwarding to the leader to fetch leader logs when API load balancers are used.

Open
#16,659 0 comments 9 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
30.1k
Forks
4.6k
Avg merge
1d 18h
Merged PRs (30d)
39

Description

#### Feature Description

The `consul monitor` command should support the ability to fetch logs from the Consul Leader.

Currently, if there is an API load balancer in front of all the Consul Servers, you have to roll the dice as to whether or not the `consul monitor` command is going to connect to the leader or one of the followers.

It would be handy to have the ability where if a follower server is connected to, the follower can forward the request to the server and then essentially tunnel the logs back through.

#### Use Case(s)

This is particularly relevant where HCP Consul is used, and we need to fetch logs from the leader specifically, such as when troubleshooting a potential network issue with cluster peering. We specifically need the Consul leader's logs when attempting to establish the peering connection.

I imagine there are likely many other use cases where connecting to the leader logs, via a follower is necessary.

Contributor guide

Open the contributing guide

Research direction

Start at the Consul monitor command entry point and trace how it connects to servers and streams logs. Investigate the existing server-to-server forwarding paths before deciding how a follower could tunnel the leader's logs. Done means monitor can request leader logs through a follower when an API load balancer selects a non-leader server.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
cli, distributed-systems
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.