The strftime format should be: %FT%T%z, but I don' know how to get the \n off the string to make the log message all on one line.
Example from log (from branch: topic_timestamp_logging)
A preregistration was atempted User:1001 IP:50.149.72.66 at Tue Aug 9 22:41:07 2016
A registration was atempted User:1001 IP:50.149.72.66 at Tue Aug 9 22:41:07 2016
A preregistration was atempted User:1001 IP:50.149.72.66 at Tue Aug 9 22:41:35 2016
A registration was atempted User:1001 IP:50.149.72.66 at Tue Aug 9 22:41:35 2016
A preregistration was atempted User:1009 IP:50.149.72.66 at Tue Aug 9 22:44:32 2016
A registration was atempted User:1009 IP:50.149.72.66 at Tue Aug 9 22:44:32 2016
A registration failed User:1009 IP:50.149.72.66 at Tue Aug 9 22:44:32 2016
A preregistration was atempted User:1009 IP:50.149.72.66 at Tue Aug 9 22:44:39 2016
A registration was atempted User:1009 IP:50.149.72.66 at Tue Aug 9 22:44:39 2016
A registration failed User:1009 IP:50.149.72.66 at Tue Aug 9 22:44:39 2016
It would be nice to use ISO 8601 Timestamps. According to fail2ban documentation, they should be at the beginning of the string.
The strftime format should be:
%FT%T%z
, but I don' know how to get the\n
off the string to make the log message all on one line.Example from log (from branch: topic_timestamp_logging)
A preregistration was atempted User:1001 IP:50.149.72.66 at Tue Aug 9 22:41:07 2016 A registration was atempted User:1001 IP:50.149.72.66 at Tue Aug 9 22:41:07 2016 A preregistration was atempted User:1001 IP:50.149.72.66 at Tue Aug 9 22:41:35 2016 A registration was atempted User:1001 IP:50.149.72.66 at Tue Aug 9 22:41:35 2016 A preregistration was atempted User:1009 IP:50.149.72.66 at Tue Aug 9 22:44:32 2016 A registration was atempted User:1009 IP:50.149.72.66 at Tue Aug 9 22:44:32 2016 A registration failed User:1009 IP:50.149.72.66 at Tue Aug 9 22:44:32 2016 A preregistration was atempted User:1009 IP:50.149.72.66 at Tue Aug 9 22:44:39 2016 A registration was atempted User:1009 IP:50.149.72.66 at Tue Aug 9 22:44:39 2016 A registration failed User:1009 IP:50.149.72.66 at Tue Aug 9 22:44:39 2016