#798923 Fail2Ban is not able to match date & timestamp

#798923#5
Date:
2015-09-14 07:32:51 UTC
From:
To:
Release: 12.04

In our logging system, we have different format for date and timestamp.
This format is currently not supported by Fail2Ban while matching regular
Expressions.

Here is the sample format

Sep 11 2015 20:45:01

Year(2015) has been added by us in the format.
-------------------------

Transcript:

*$ fail2ban-regex /var/log/auth.log /etc/fail2ban/filter.d/sshd.conf*

*Found a match* for 'Sep 11 2015 20:58:41 regressionkvm-app sshd[7538]:
Failed password for admin from 10.128.0.27 port 40190 ssh2' *but no valid
date/time found* for 'Sep 11 2015 20:58:41 regressionkvm-app sshd[7538]:
Failed password for admin from 10.128.0.27 port 40190 ssh2
'. *Please contact the author* in order to get support for this format.

Can you please add support for this format?

-
Amit Zala

#798923#10
Date:
2015-09-14 12:27:46 UTC
From:
To:
and the version of fail2ban is??
#798923#15
Date:
2015-09-14 12:27:46 UTC
From:
To:
and the version of fail2ban is??
#798923#20
Date:
2015-09-16 13:01:40 UTC
From:
To:
ok -- will be fixed upstream
https://github.com/fail2ban/fail2ban/pull/1191

meanwhile with your upgraded fail2ban you can specify that datepattern
directly for your jail, just add in your jail.local or whatever file you
are using for customizations

[sshd]
datepattern = (?:%a )?%b %d %Y %H:%M:%S(?:\.%f)?

it might work ;) (i.e. I haven't tried ... but feature is there)