Quantcast
Channel: HAProxy community - Latest topics
Viewing all articles
Browse latest Browse all 4714

Frontend IP and ports not logged in TCP mode, custom log format (%fi %fp)

$
0
0

@mattiwei wrote:

Hi there!
I am trying to have HAProxy log the frontend's IP and port for the client side. I am running haproxy 1.5.14 on RHEL 7.2

These are the relevant configuration parts:

defaults
    mode                    tcp
    log                     global
    log-format %H\ [%t]\ %ci:%cp->%fi:%fp(%ft)\ %bi:%bp->%si:%sp(%s)\ %Tw/%Tc/%Tt\ %U/%B\ %ts\ %ac/%fc/%bc/%sc/%rc\ %sq/%bq

listen Test
    bind 192.168.0.1:2291  # external interface
    bind 10.0.0.1:2291     # internal interface
    server test-src2 10.0.1.100:2291 source 10.0.0.2

Now: Everything works like a charm, but the log looks like this:
Jun 20 14:50:16 localhost haproxy[16961]: testbox [20/Jun/2017:14:50:11.149] 102.168.0.100:61923->:0(Test) 10.0.0.2:5647->10.0.1.100:2291(test-src2) 1/0/5653 18/48 -- 0/0/0/0/0 0/0

As you see, is the log part "%fi:%fp" expanded into ":0 . I would expect the frontend destination IP and port. What am I missing?

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 4714

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>