Merge pull request #555 from grooverdan/nagios_fix

BF: nagios fix
pull/542/merge
Daniel Black 2014-01-06 03:12:26 -08:00
commit b9cd492e9f
2 changed files with 4 additions and 1 deletions

View File

@ -31,6 +31,8 @@ ver. 0.8.12 (2013/12/XX) - things-can-only-get-better
Closes gh-516 Closes gh-516
- Asynchat changed to use push method which verifys whether all data was - Asynchat changed to use push method which verifys whether all data was
send. This ensures that all data is sent before closing the connection. send. This ensures that all data is sent before closing the connection.
- Removed unnecessary reference to as yet undeclared $jail_name when checking
a specific jail.
- Enhancements: - Enhancements:
- added firewallcmd-ipset action - added firewallcmd-ipset action

View File

@ -108,6 +108,7 @@ my ($critical,$warning) = (2,1);
my $fail2ban_client_path = '/usr/bin/fail2ban-client'; my $fail2ban_client_path = '/usr/bin/fail2ban-client';
my $fail2ban_socket = ''; my $fail2ban_socket = '';
my $jail_specific = ''; my $jail_specific = '';
my $jail_name = '';
GetOptions ( GetOptions (
'P=s' => \ $fail2ban_client_path, 'P=s' => \ $fail2ban_client_path,
@ -190,7 +191,7 @@ if ($jail_specific) {
else { else {
$how_many_banned = int($current_ban_number); $how_many_banned = int($current_ban_number);
$return_print = $how_many_banned.' current banned IP(s) for the specific jail '.$jail_specific; $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 ### To analyze all the jail