sudo cscli collections install crowdsecurity/apiscpInstalls 9 parsers and 56 scenarios, via HAProxy - Generic Protection.
View ApisCP →sudo cscli parsers install crowdsecurity/haproxy-logsThen reload CrowdSec: sudo systemctl reload crowdsec
Sign in to see which of your engines run it →Hover a line or a note to see what each field does.
filter: "evt.Parsed.program startsWith 'haproxy'"onsuccess: next_stagename: crowdsecurity/haproxy-logsdescription: "Parse haproxy http logs"nodes:- grok:pattern: '%{IP:client_ip}:%{INT:client_port} \[%{HAPROXYDATE:accept_date}\] %{NOTSPACE:frontend_name} %{NOTSPACE:backend_name}/%{NOTSPACE:server_name} %{INT:time_request}/%{INT:time_queue}/%{INT:time_backend_connect}/%{INT:time_backend_response}/%{NOTSPACE:time_duration} %{INT:http_status_code} %{NOTSPACE:bytes_read} %{DATA:captured_request_cookie} %{DATA:captured_response_cookie} %{NOTSPACE:termination_state} %{INT:actconn}/%{INT:feconn}/%{INT:beconn}/%{INT:srvconn}/%{NOTSPACE:retries} %{INT:srv_queue}/%{INT:backend_queue} (\{%{HAPROXYCAPTUREDREQUESTHEADERS}\})?( )?(\{%{HAPROXYCAPTUREDRESPONSEHEADERS}\})?( )?"(<BADREQ>|(%{WORD:http_verb} (%{URIPROTO:http_proto}://)?(?:%{USER:http_user}(?::[^@]*)?@)?(?:%{URIHOST:http_host})?(?:%{URIPATHPARAM:http_request})?( HTTP/%{NUMBER:http_version})?))?"'apply_on: messagestatics:- meta: log_typevalue: http_access-log- grok:pattern: '%{IP:client_ip}:%{INT:client_port} \[%{HAPROXYDATE:accept_date}\] %{NOTSPACE:frontend_name}/%{NOTSPACE:server_name}: SSL handshake failure'apply_on: messagestatics:- meta: log_typevalue: bad_ssl_handshakestatics:#HAPROXYDATE format is unknown to dateparse, let convert it to a format we know to parse- target: evt.StrTimeexpression: evt.Parsed.haproxy_monthday + '/' + evt.Parsed.haproxy_month + '/' + evt.Parsed.haproxy_year + ':' + evt.Parsed.haproxy_hour + ':' + evt.Parsed.haproxy_minute + ':' + evt.Parsed.haproxy_second[0:2] + ' -0000'- meta: servicevalue: http- meta: source_ipexpression: evt.Parsed.client_ip- meta: http_pathexpression: evt.Parsed.http_request- meta: http_statusexpression: evt.Parsed.http_status_code- meta: http_verbexpression: evt.Parsed.http_verb- parsed: requestexpression: evt.Parsed.http_request- parsed: verbexpression: evt.Parsed.http_verb
Sign in to see the Security Engines that run this log parser, the version they run and whether it was modified locally.