by using fail2ban I want to block IPs which match with error 429 in haproxy log.
by using fail2ban I want to block IPs which match with error 429 in haproxy log. I already tried below regex but didn't work. You suggestion is appreciated
failregex = .*:<HOST>(?::\d+)?\s+.*\d* 429
failregex = ^%(__prefix_line)s<HOST>(?::\d+)?\s+.*<NOSRV> -1/-1/-1/-1/\+*\d* 429
Sample haproxy log
Feb 16 07:43:51 ip-10-100-212-165 haproxy[1624130]: 158.118.198.219:42990 [16/Feb/2023:07:43:50.242] r_a_i~ it_backup_server/it-server-04-de 0/0/0/1181/1181 429 4436 - - --NI 1211/1210/38/13/0 0/0 "POST / HTTP/1.1"
you should adjust the regex into something more generic, like this: