From b5b581555c94cd1c42e64f5ff26b5912099a2130 Mon Sep 17 00:00:00 2001 From: Daniel Black Date: Fri, 3 Jan 2014 19:56:49 +1100 Subject: [PATCH 1/3] BF: nagios fix --- files/nagios/check_fail2ban | 1 + 1 file changed, 1 insertion(+) diff --git a/files/nagios/check_fail2ban b/files/nagios/check_fail2ban index 9bf14305..d4f9834f 100755 --- a/files/nagios/check_fail2ban +++ b/files/nagios/check_fail2ban @@ -108,6 +108,7 @@ my ($critical,$warning) = (2,1); my $fail2ban_client_path = '/usr/bin/fail2ban-client'; my $fail2ban_socket = ''; my $jail_specific = ''; +my $jail_name = ''; GetOptions ( 'P=s' => \ $fail2ban_client_path, From 5428f5bbc3bf9bf347244376cd289ba5dd5551d1 Mon Sep 17 00:00:00 2001 From: alasdairdc Date: Mon, 6 Jan 2014 10:43:32 +0000 Subject: [PATCH 2/3] Update check_fail2ban Removed unnecessary reference to as yet undeclared $jail_name when checking a specific jail. --- files/nagios/check_fail2ban | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/files/nagios/check_fail2ban b/files/nagios/check_fail2ban index 9bf14305..90c58713 100755 --- a/files/nagios/check_fail2ban +++ b/files/nagios/check_fail2ban @@ -190,7 +190,7 @@ if ($jail_specific) { else { $how_many_banned = int($current_ban_number); $return_print = $how_many_banned.' current banned IP(s) for the specific jail '.$jail_specific; - $perf_print .= "$jail_name.currentBannedIP=$current_ban_number " if ($perfdata_value); + $perf_print .= "$current_ban_number " if ($perfdata_value); } } ### To analyze all the jail From 67c44a500199b10d7dd5cddc792ea486adb7730d Mon Sep 17 00:00:00 2001 From: alasdairdc Date: Mon, 6 Jan 2014 10:44:21 +0000 Subject: [PATCH 3/3] Update ChangeLog --- ChangeLog | 1 + 1 file changed, 1 insertion(+) diff --git a/ChangeLog b/ChangeLog index 77fd6a03..ffe27d73 100644 --- a/ChangeLog +++ b/ChangeLog @@ -27,6 +27,7 @@ ver. 0.8.12 (2013/12/XX) - things-can-only-get-better - complain action - ensure where not matching other IPs in log sample. Closes gh-467 - Fix firewall-cmd actioncheck - patch from Adam Tkac. Redhat Bug #979622 + - Removed unnecessary reference to as yet undeclared $jail_name when checking a specific jail. - Enhancements: - long names on jails documented based on iptables limit of 30 less