changeset 67:4be7f49debc2

"Already Banned" is actually at NOTICE
author IBBoard <dev@ibboard.co.uk>
date Sun, 11 Oct 2015 18:41:53 +0000
parents e424cd208b99
children 8a1ea9fdf5b2
files common/logwatch/services-fail2ban manifests/templates.pp
diffstat 2 files changed, 4 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/common/logwatch/services-fail2ban	Sat Sep 26 14:28:16 2015 +0000
+++ b/common/logwatch/services-fail2ban	Sun Oct 11 18:41:53 2015 +0000
@@ -102,7 +102,7 @@
 	push @{$ServicesBans{$Service}{$Host}{'Failures'}}, $NumFailures;
     } elsif ( my ($Service,$Host) = ($ThisLine =~ m/ ERROR:\s(.*):\s(\S+)\salready in ban list/)) {
    	 $ServicesBans{$Service}{$Host}{'AlreadyInTheList'}++;
-    } elsif ( my ($Service,$Host) = ($ThisLine =~ m/(?:INFO|WARNING)\s*\[(.*)\]\s*(\S+)\s*already banned/)) {
+    } elsif ( my ($Service,$Host) = ($ThisLine =~ m/(?:INFO|WARNING|NOTICE)\s*\[(.*)\]\s*(\S+)\s*already banned/)) {
        $ServicesBans{$Service}{$Host}{'AlreadyInTheList'}++;
     } elsif ( my ($Service,$Host) = ($ThisLine =~ m/ WARNING:\s(.*):\sReBan (\S+)/)) {
 	    $ServicesBans{$Service}{$Host}{'ReBan'}++;
--- a/manifests/templates.pp	Sat Sep 26 14:28:16 2015 +0000
+++ b/manifests/templates.pp	Sun Oct 11 18:41:53 2015 +0000
@@ -176,6 +176,9 @@
 		require => Package['fail2ban'],
 		notify => Service['fail2ban'],
 	}
+	file { '/etc/fail2ban/fail2ban.local':
+		source => 'puppet:///common/fail2ban/fail2ban.local',
+	}
 	file { '/etc/fail2ban/jail.local':
 		source => 'puppet:///common/fail2ban/jail.local',
 	}
@@ -200,10 +203,6 @@
 	file { '/etc/fail2ban/filter.d/ibb-postfix.conf':
 		source => 'puppet:///common/fail2ban/ibb-postfix.conf',
 	}
-	file { '/etc/fail2ban/fail2ban.local':
-		content => '[Definition]
-logtarget = /var/log/fail2ban.log'
-	}
 }
 
 #Our web server with our configs, not just a stock one