gforcada / haproxy_log_analysis

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

Make syslog optional #10

Closed gforcada closed 9 years ago

gforcada commented 9 years ago

Referring to #9 a raw haproxy log not redirected to syslog will not contain the syslog slug at the beginning.

Make haproxy_log_analysis be able to handle this.

/cc @jason-ryan

jason-ryan commented 9 years ago

Just wondered whether you had a chance to take a look at this?

Jason

gforcada commented 9 years ago

@jason-ryan sorry still not, lots of things to do at life and work... I accept patches though :)

jason-ryan commented 9 years ago

No problem - afraid Python isn't my forte!

I'll take a quick peek at it though out of curiosity, I assume its just some pattern matching/parsing stuff on the line?

gforcada commented 9 years ago

@jason-ryan sorry busy days lately... Yes, the regular expression is this one:

https://github.com/gforcada/haproxy_log_analysis/blob/master/haproxy/haproxy_logline.py#L14

The easiest would be to remove the syslog slug at the beginning of HaproxyLogLine._parse_line if there is such slug and if not just proceed.

I will try to work on it on the following days or weeks, but can't promise on it sadly.

gforcada commented 9 years ago

@jason-ryan I just released version 1.1, can you give it a try? It should work without syslog.

jason-ryan commented 9 years ago

Bingo - tried a few commands and they work - thanks, great work! :-)

[image: photo] Jason Ryan VP Engineering

Trustev Real Time, Online Identity Verification

email: jason.ryan@trustev.com skype: jason_j_ryan web: www.trustev.com

Trustev Ltd, 2100 Cork Airport Business Park, Cork, Ireland.

On 19 April 2015 at 20:53, Gil Forcada Codinachs notifications@github.com wrote:

@jason-ryan https://github.com/jason-ryan I just released version 1.1, can you give it a try? It should work without syslog.

— Reply to this email directly or view it on GitHub https://github.com/gforcada/haproxy_log_analysis/issues/10#issuecomment-94308927 .

This message is for the named person's use only. If you received this message in error, please immediately delete it and all copies and notify the sender. You must not, directly or indirectly, use, disclose, distribute, print, or copy any part of this message if you are not the intended recipient. Any views expressed in this message are those of the individual sender and not Trustev Ltd. Trustev is registered in Ireland No. 516425 and trades from 2100 Cork Airport Business Park, Cork, Ireland.