Class: RequestLogAnalyzer::FileFormat::Haproxy
- Extended by:
- CommonRegularExpressions
- Defined in:
- lib/request_log_analyzer/file_format/haproxy.rb
Defined Under Namespace
Classes: Request
Constant Summary
Constants included from CommonRegularExpressions
CommonRegularExpressions::TIMESTAMP_PARTS
Constants inherited from Base
Instance Attribute Summary
Attributes inherited from Base
#line_definitions, #report_trackers
Class Method Summary collapse
-
.compose_regexp(millisecs, backends, counters, connections, queues) ⇒ Object
substitute version specific parts of the haproxy entry regexp.
Methods included from CommonRegularExpressions
anchored, hostname, hostname_or_ip_address, ip_address, timestamp
Methods inherited from Base
#captures?, create, format_definition, #initialize, line_definer, line_definition, #line_divider, #max_line_length, #parse_line, report, report_definer, #request, #request_class, #setup_environment, #valid_line_definitions?, #valid_request_class?, #well_formed?
Methods included from ClassLevelInheritableAttributes
#inheritable_attributes, #inherited
Constructor Details
This class inherits a constructor from RequestLogAnalyzer::FileFormat::Base
Class Method Details
.compose_regexp(millisecs, backends, counters, connections, queues) ⇒ Object
substitute version specific parts of the haproxy entry regexp.
6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
# File 'lib/request_log_analyzer/file_format/haproxy.rb', line 6 def self.compose_regexp(millisecs, backends, counters, connections, queues) %r{ (#{ip_address}):\d+\s # client_ip ':' client_port \[(#{('%d/%b/%Y:%H:%M:%S')})#{millisecs}\]\s # '[' accept_date ']' (\S+)\s # frontend_name #{backends} #{counters} (\d+)\s # status_code \+?(\d+)\s # bytes_read (\S+)\s # captured_request_cookie (\S+)\s # captured_response_cookie (\w|-)(\w|-)(\w|-)(\w|-)\s # termination_state #{connections} #{queues} (\S*)\s? # captured_request_headers (\S*)\s? # captured_response_headers "([^"]*)" # '"' http_request '"' }x end |