gforcada / haproxy_log_analysis

HAProxy log analyzer
https://pypi.org/project/haproxy_log_analysis
GNU General Public License v3.0
88 stars 35 forks source link

zero lines parsed #28

Closed bsimm closed 7 years ago

bsimm commented 7 years ago

Hi, I'm having an issue parsing my log file. Here's the output:

$ haproxy_log_analysis -l screenlog.log -c counter
command: counter
================
0
$ rm screenlog.log.pickle
$ haproxy_log_analysis -l screenlog.log -c counter
command: counter
================
0

Here's a sample line from my log file (sensitive info scrubbed):

2017/07/19 14:47:47 <local0,info> SOME.IP:PORT [19/Jul/2017:14:47:47.805] http-in test/upstream 0/0/1/3/4 200 251 - - ---- 1/1/0/1/0 0/0 "POST /SOME/URL HTTP/1.1"

gforcada commented 7 years ago

@bsimm hi! Thanks for using haproxy_log_analysis and for taking the time to report issues!

I will try to have a look, although I'm rather busy right now.

Do you have, by any chance, python skills? You could check the regular expressions used to parse the log lines https://github.com/gforcada/haproxy_log_analysis/blob/master/haproxy/line.py#L26-L79

bsimm commented 7 years ago

Ah yes, It's definitely a regex mismatch. Thanks.