Class: HAProxyLogParser::Entry
- Inherits:
-
Object
- Object
- HAProxyLogParser::Entry
- Defined in:
- lib/haproxy_log_parser/entry.rb
Overview
An instance of this class represents a line/entry of an HAProxy log in the HTTP format. See the “Logging > Log formats > HTTP log format” section in HAProxy’s configuration.txt for documentation of fields/attributes.
Instance Attribute Summary collapse
- #accept_date ⇒ Time
- #actconn ⇒ Integer
- #backend_name ⇒ String
- #backend_queue ⇒ Integer
- #beconn ⇒ Integer
- #bytes_read ⇒ Integer
- #captured_request_cookie ⇒ Hash{String => String}
- #captured_request_headers ⇒ Array<String>
- #captured_response_cookie ⇒ Hash{String => String}
- #captured_response_headers ⇒ Array<String>
- #client_ip ⇒ String
- #client_port ⇒ Integer
- #feconn ⇒ Integer
- #frontend_name ⇒ String
- #http_request ⇒ String
- #retries ⇒ Integer
- #server_name ⇒ String
- #srv_conn ⇒ Integer
- #srv_queue ⇒ Integer
- #status_code ⇒ Integer
- #tc ⇒ Integer
- #termination_state ⇒ String
- #tq ⇒ Integer
- #tr ⇒ Integer
-
#transport_mode ⇒ String
‘~’ if SSL, ” otherwise (HAProxy 1.5 adds a ‘~’ suffix to the frontend name if request went through SSL).
- #tt ⇒ Integer
- #tw ⇒ Integer
Instance Method Summary collapse
-
#ssl? ⇒ Boolean
return [true, false] true if and only if request was SSL.
Instance Attribute Details
#accept_date ⇒ Time
13 14 15 |
# File 'lib/haproxy_log_parser/entry.rb', line 13 def accept_date @accept_date end |
#actconn ⇒ Integer
60 61 62 |
# File 'lib/haproxy_log_parser/entry.rb', line 60 def actconn @actconn end |
#backend_name ⇒ String
24 25 26 |
# File 'lib/haproxy_log_parser/entry.rb', line 24 def backend_name @backend_name end |
#backend_queue ⇒ Integer
78 79 80 |
# File 'lib/haproxy_log_parser/entry.rb', line 78 def backend_queue @backend_queue end |
#beconn ⇒ Integer
66 67 68 |
# File 'lib/haproxy_log_parser/entry.rb', line 66 def beconn @beconn end |
#bytes_read ⇒ Integer
48 49 50 |
# File 'lib/haproxy_log_parser/entry.rb', line 48 def bytes_read @bytes_read end |
#captured_request_cookie ⇒ Hash{String => String}
51 52 53 |
# File 'lib/haproxy_log_parser/entry.rb', line 51 def @captured_request_cookie end |
#captured_request_headers ⇒ Array<String>
81 82 83 |
# File 'lib/haproxy_log_parser/entry.rb', line 81 def captured_request_headers @captured_request_headers end |
#captured_response_cookie ⇒ Hash{String => String}
54 55 56 |
# File 'lib/haproxy_log_parser/entry.rb', line 54 def @captured_response_cookie end |
#captured_response_headers ⇒ Array<String>
84 85 86 |
# File 'lib/haproxy_log_parser/entry.rb', line 84 def captured_response_headers @captured_response_headers end |
#client_ip ⇒ String
7 8 9 |
# File 'lib/haproxy_log_parser/entry.rb', line 7 def client_ip @client_ip end |
#client_port ⇒ Integer
10 11 12 |
# File 'lib/haproxy_log_parser/entry.rb', line 10 def client_port @client_port end |
#feconn ⇒ Integer
63 64 65 |
# File 'lib/haproxy_log_parser/entry.rb', line 63 def feconn @feconn end |
#frontend_name ⇒ String
16 17 18 |
# File 'lib/haproxy_log_parser/entry.rb', line 16 def frontend_name @frontend_name end |
#http_request ⇒ String
87 88 89 |
# File 'lib/haproxy_log_parser/entry.rb', line 87 def http_request @http_request end |
#retries ⇒ Integer
72 73 74 |
# File 'lib/haproxy_log_parser/entry.rb', line 72 def retries @retries end |
#server_name ⇒ String
27 28 29 |
# File 'lib/haproxy_log_parser/entry.rb', line 27 def server_name @server_name end |
#srv_conn ⇒ Integer
69 70 71 |
# File 'lib/haproxy_log_parser/entry.rb', line 69 def srv_conn @srv_conn end |
#srv_queue ⇒ Integer
75 76 77 |
# File 'lib/haproxy_log_parser/entry.rb', line 75 def srv_queue @srv_queue end |
#status_code ⇒ Integer
45 46 47 |
# File 'lib/haproxy_log_parser/entry.rb', line 45 def status_code @status_code end |
#tc ⇒ Integer
36 37 38 |
# File 'lib/haproxy_log_parser/entry.rb', line 36 def tc @tc end |
#termination_state ⇒ String
57 58 59 |
# File 'lib/haproxy_log_parser/entry.rb', line 57 def termination_state @termination_state end |
#tq ⇒ Integer
30 31 32 |
# File 'lib/haproxy_log_parser/entry.rb', line 30 def tq @tq end |
#tr ⇒ Integer
39 40 41 |
# File 'lib/haproxy_log_parser/entry.rb', line 39 def tr @tr end |
#transport_mode ⇒ String
Returns ‘~’ if SSL, ” otherwise (HAProxy 1.5 adds a ‘~’ suffix to the frontend name if request went through SSL).
21 22 23 |
# File 'lib/haproxy_log_parser/entry.rb', line 21 def transport_mode @transport_mode end |
#tt ⇒ Integer
42 43 44 |
# File 'lib/haproxy_log_parser/entry.rb', line 42 def tt @tt end |
#tw ⇒ Integer
33 34 35 |
# File 'lib/haproxy_log_parser/entry.rb', line 33 def tw @tw end |
Instance Method Details
#ssl? ⇒ Boolean
return [true, false] true if and only if request was SSL
90 91 92 |
# File 'lib/haproxy_log_parser/entry.rb', line 90 def ssl? @transport_mode == '~' end |