Bind "name" parameter seems to be ignored

Howdy,

I’m trying to condense my configruation for 1.6.6 a bit. Instead of

frontend FE-1
    bind 172.17.1.11:443 ssl crt /etc/ssl/private/mycert.pem
    reqadd "X-Forwarded-Proto: https"
    default_backend app-servers

frontend FE-2
    bind 172.17.1.12:443 ssl crt /etc/ssl/private/mycert.pem
    reqadd "X-Forwarded-Proto: https"
    default_backend app-servers

frontend FE-3
    bind 172.17.1.13:443 ssl crt /etc/ssl/private/mycert.pem
    reqadd "X-Forwarded-Proto: https"
    default_backend app-servers

I thought I could do something like

frontend SSL
    bind 172.17.1.11:443 ssl crt /etc/ssl/private/mycert.pem name FE-1
    bind 172.17.1.12:443 ssl crt /etc/ssl/private/mycert.pem name FE-2
    bind 172.17.1.13:443 ssl crt /etc/ssl/private/mycert.pem name FE-3
    reqadd "X-Forwarded-Proto: https"
    default_backend app-servers

The docs tell me

name

Sets an optional name for these sockets, which will be reported on the stats
page.

However, I seem not the see any of may names on the stats page.

Is it a misunderstanding on my side what the name is for, or may it be a bug?

Thanks

Sascha

The problem is not that the name is ignored, but that the individual listening socket doesn’t show up. You need to have “option socket-stats” in your frontend if you want each bind line to appear on the stats page. The doc for “name” would need to be updated to specificly refer to this option in my opinion, feel free to send a patch to the mailing list!

Excellent and useful, thanks a lot. Proposal for configuration.txt:

--- git.haproxy.org.txt 2016-07-13 13:45:19.210366893 +0200
+++ configuration.txt  2016-07-13 13:50:56.539746982 +0200
@@ -5969,6 +5969,9 @@
 no option socket-stats
 
   Enable or disable collecting & providing separate statistics for each socket.
+  Note: see also bind parameter "name" in section 5.1 to give each socket a
+  meaningul, well, name.
+
   May be used in sections :   defaults | frontend | listen | backend
                                  yes   |    yes   |   yes  |   no
 
@@ -9818,7 +9821,7 @@
 
 name <name>
   Sets an optional name for these sockets, which will be reported on the stats
-  page.
+  page. Requires "option socket-stats", see section 4.2.
 
 namespace <name>
   On Linux, it is possible to specify which network namespace a socket will

Best

Sascha