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

Allow filters per command #38

Open gforcada opened 4 years ago

gforcada commented 4 years ago

Right now one can run a given number of commands after a list of filters have trimmed the complete log file.

This is usually fine, but limits its flexibility, specially given that parsing huge files is really time consuming.

The idea would be that with a single pass through the log file, one could run commands with a different set of filters, i.e. something like:

haproxy_log_analysis -l haproxy.log -p counter,top_ips(status_code[200]),slow_requests_counter(slow_requests[5000],backend[slow])

This above would mean:

Right now, if you want to achieve that you have to call haproxy_log_analysis three times, as filters are applied globally.