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

How to capture req and response in MLB HAProxy

$
0
0

@sagar_haproxy wrote:

Hi,

Basically I’m trying to get a new log format, to achieve this I need to capture some values from front end http request and response.

  • For the log format I have added the HAPROXY_HEAD template to the Marathon config and its working fine
  • I’m not really sure how to add the below captures to the front end which is for Port 80.

declare capture request len 24
http-request capture req.hdr(X-Request-Id) id 0

Capture the user id from header for logging

declare capture request len 36
http-request capture req.hdr(VDSID) id 1

Capture the ReqAppId from header for logging

declare capture request len 36
http-request capture req.hdr(ReqAppId) id 2

Note : HAPROXY is running in a container and new services always append to the Front end automatically.

When I have tried to add the HAPROXY_HTTP_FRONTEND_HEAD, HAPROX_FRONTEND_HEAD templates but it created another front end for port 80 and services were failing sometimes.

So I want a solution that will append the captures to the existing frontend marathon_http_in??

Thanks for your help.

Posts: 2

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 4720

Trending Articles



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