Hi Philipp,

On Fri, Sep 13, 2019 at 12:07:36PM +0200, Philipp Kolmann wrote:
> Hi,
> 
> I need to reverse proxy a range of TCP ports via HAproxy. It works just
> fine, but now I have a list of open Ports in the Webinterface with no idea
> which port is which:
> 
> listen xx
>         bind 0.1.2.3:8100-8150 transparent name repos
>         mode tcp
>         timeout client 12h
>         log-format %ci:%cp\ [%t]\ %ft\ %s\ %si:%sp\ %Tw/%Tc/%Tt\ %B\ %ts\
> %ac/%fc/%bc/%sc/%rc\ %sq/%bq
>         option tcp-check
>         tcp-check connect port 8100
>         server name 172.1.2.3 maxconn 10000 check
> 
> I see 51 lines with 'name' in the statistics report.
> 
> I searched the docs but couldn't find a possibility to add the port to the
> name. My Idea would be to be able to specify

If you're fine with having the address and port reported in a tooltip
when you hover over the name, just enabling "stats show-legends" in the
frontend which shows your stats will achieve this.

>         server name-%p 172.1.2.3 maxconn 10000 check
> 
> and in the statistics it would read
> 
> name-8100
> name-8101
> etc...
> 
> Is this already possible?

You cannot change the name like this, and I understand how it could be
useful. With this said, it's important to note that it's also possible
to have multiple addresses on a same bind line so using only the port
as the discriminant would not satisfy all needs, thus it would suddenly
require to achieve something more complex/complete for rare use cases.
That's why I'd encourage you to first try "stats show-legends".

Regards,
Willy

Reply via email to