Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
A Ruby library to parse logs in HAProxy's HTTP log format
Ruby
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
lib Relax termination_state rule to allow any letters
spec
.gitignore
LICENSE
README.rdoc
VERSION Bump version to 0.0.4
haproxy_log_parser.gemspec

README.rdoc

haproxy_log_parser

haproxy_log_parser is a gem that uses Treetop to parse HAProxy logs in HAProxy's HTTP log format.

Example

require 'haproxy_log_parser'
result = HAProxyLogParser.parse('Aug  9 20:30:46 localhost haproxy[2022]: 10.0.8.2:34028 [09/Aug/2011:20:30:46.429] proxy-out proxy-out/cache1 1/0/2/126/+128 301 +223 - - ---- 617/523/336/168/0 0/0 {www.sytadin.equipement.gouv.fr||http://trafic.1wt.eu/} {Apache|230|||http://www.sytadin.} "GET http://www.sytadin.equipement.gouv.fr/ HTTP/1.1"')
result.client_ip # => "10.0.8.2"
result.captured_response_headers # => ["Apache", "230", "", "", "http://www.sytadin."]
Something went wrong with that request. Please try again.