Closed sujanbonga-devops closed 1 year ago
You'll probably need to move to v0.14 and add --master-worker command-line option, and after that configure log to stdout. Note that controller and proxy logs will be sent together in the same output.
Please lets move this to the slack channel since this issue tracker is exclusively for bugs and feature requests.
Hi
I am using haproxy ingress controller and image is "quay.io/jcmoraisjr/haproxy-ingress:v0.13.8" and i want to enable access logs of haproxy to be stdout , i have configured in global as below to send logs to stdout . But when i do logs on haproxy pod i am not able to see the access logs like 200, 400 requests
global daemon unix-bind mode 0600 stats socket /var/run/haproxy/admin.sock level admin expose-fd listeners mode 600 maxconn 2000 hard-stop-after 10m log stdout len 1024 format raw local0
I dont want to use any sidecar like rsyslog or fluend or fluentbit , I want to use container itself .
Can you help on this please Config Map :-
kind: ConfigMap metadata: name: haproxy-ingress namespace: zaml-mh-truist-qa data:
config-global: |
log stdout format raw local0
balance-algorithm: leastconn config-defaults: |
mode http
option httplog
capture http headers for logging
config-frontend: |
option 1: the 'http-request capture' line would capture ALL http request headers for logging, but we probably don't need
http-log-format: '{"local_time":"%Tl","GMT":"%T","backend":{"name":"%b","concurrent_connections":%bc,"source_ip":"%bi","source_port":%bp,"queue":%bq},"bytes":{"read":%B,"uploaded":%U},"captured_headers":{"request":"%hr","response":"%hs"},"client":{"ip":"%ci","port":%cp},"frontend":{"name":"%f","concurrent_connections":%fc,"ip":"%fi","port":%fp,"name_transport":"%ft","log_counter":%lc},"hostname":"%H","http":{"method":"%HM","request_uri_without_query_string":"%HP","request_uri_query_string":"%HQ","request_uri":"%HU","version":"%HV","unique_ID":"%ID","status_code":%ST,"request":"%r"},"process_concurrent_connections":%ac,"request_counter":%rt,"server":{"name":"%s","concurrent_connections":%sc,"ip":"%si","port":%sp,"queue":%sq},"timers":{"tr":"%tr","Ta":%Ta,"Tc":%Tc,"Td":%Td,"Th":%Th,"Ti":%Ti,"Tq":%Tq,"TR":%TR,"Tr":%Tr,"Tt":%Tt,"Tw":%Tw}}' ssl-redirect: "true" syslog-endpoint: "stdout" syslog-format: "raw"
syslog-facility: daemo
timeout-client: 310s timeout-client-fin: 310s timeout-server: 310s timeout-server-fin: 310s timeout-keep-alive: 310s