I'm trying to figure out why i'm getting BADREQs from time to time, by using "show errors" in socat. The problem is that it only shows the last error. I want to be able to see all of them ( like using tail -f ... | grep something).
can somebody tell me please how can I continuously show these BADREQs? with or without socat?
The real problem is that I'm getting BADREQs in haproxy log, but [echo "show errors" | socat unix-connect:/var/run/haproxy.sock stdio] does not catch them. Is it something with haproxy configuration?
Since show errors is defined as:
show errors : report last request and response errors for each proxy
I think you might be out of luck. However, with a little shell scripting, you should be able to collect enough of them in a file to get to the bottom of it:
maybe the increasing counter means no real "bad requests", but things like port scans, as mentioned in https://serverfault.com/a/202654/227214 ?
I also notice increasing badreq-counters without matching entries in "show errors".