Hi,

Thank you very much for such a good and useful product. I hope you can help
me in this problem i'm having with HAProxy.

The problem is that when using the *tcp* mode the Lua script dont log/print
the host, path and only the ip is getting logged/printed. If i change the
mode to *http* it prints/output everything, but i need it in tcp mode. Can
someone help me to fix that?

This is how my *HAProxy Configuration* file look:

frontend RTMP bind 0.0.0.0:1935 mode tcp use_backend
%[lua.choose_backend("d")] backend a balance roundrobin mode tcp server
origin_1 192.168.1.19:1935 check fall 3 rise 2 backend b balance roundrobin
mode tcp server origin_1 192.168.1.20:1935 check fall 3 rise 2


And this is how my *Lua script*:


function my_hash(txn, salt) local str = "" str = "HOST: " ..
txn.sf:req_fhdr("host") str = str .. " PATH: " str = str .. txn.sf:path()
str = str .. " SRC: " str = str .. txn.sf:src() core.log(core.info, str)
return 'a' end core.register_fetches("choose_backend", my_hash)



Once again thank you taking the time to help me :) <3 <3

Kind regard,

Anna

Reply via email to