Sorry, I am not sure if this had been discussed before. I did a quick search in the archives, but didn't see it.
I am suggesting that each filter file that is distributed with fail2ban should contain one ore more sample line(s) for each of the regex lines. Here is the rational behind this suggestion: 1. For people who are installing and configuring the package, it would allow seeing which lines those regexes are designde for. This would significantly simplify life for many people, and especially for those who are not as versatile with the complex regex syntax. But even for those who can easily read regex, it would save time and guess-work. 2. For those people who might have (slightly) different logfile lines (for whatever reason), - it would make it easier adjusting the filter's regexes for their need. (It's easy to compare your line to that for which regex is written, rather than starting writing the regex from scratch or trying to reconstruct the original "offending" line.) 3. This is in a spirit of test-driven software development. (The source tree of fail2ban tells me that fail2ban follows that.) While in the simplest case, these "sample" lines would be commented out, one might be willing to make one additional step: Have a special variable (or a list/sequence), say sampleline = ['line1', 'line2', 'line3'] During the regular running as a server, fail2ban would not use it. But one can write a test module that would be helpful for further development of the core of the package (making sure that changes to the code wouldn't break the existing filters). This latter part might be already there, sorry, I didn't dig into the source code. I wonder what the development team thinks about this. Igor ------------------------------------------------------------------------------ Transform Data into Opportunity. Accelerate data analysis in your applications with Intel Data Analytics Acceleration Library. Click to learn more. http://makebettercode.com/inteldaal-eval _______________________________________________ Fail2ban-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/fail2ban-users
