1
0
mirror of https://github.com/opinkerfi/nagios-plugins.git synced 2024-11-25 03:43:46 +01:00

Merge pull request #45 from monitoreoDotOsiAtUchileDotCl/master

:D
This commit is contained in:
Garðar Þorsteinsson 2020-10-28 16:34:34 +00:00 committed by GitHub
commit 0440124d3a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -5,7 +5,7 @@
# Author : Patrick Proy (patrick at proy.org) # Author : Patrick Proy (patrick at proy.org)
# Help : http://nagios.manubulon.com # Help : http://nagios.manubulon.com
# Licence : GPL - http://www.fsf.org/licenses/gpl.txt # Licence : GPL - http://www.fsf.org/licenses/gpl.txt
# Patch 1.2.1b # Patch 1.2.1c
# Author : monitoreo.osi@uchile.cl # Author : monitoreo.osi@uchile.cl
# Desc: warn/crit threshold to conns/seg check # Desc: warn/crit threshold to conns/seg check
# TODO : # TODO :
@ -22,7 +22,7 @@ use Getopt::Long;
# Nagios specific # Nagios specific
use lib "/usr/local/nagios/libexec"; use lib "/usr/local/nagios/libexec";
use lib "/usr/lib/nagios/plugins"; # use in ubugtu #use lib "/usr/lib/nagios/plugins"; # use in ubugtu
use utils qw(%ERRORS $TIMEOUT); use utils qw(%ERRORS $TIMEOUT);
#my $TIMEOUT = 15; #my $TIMEOUT = 15;
#my %ERRORS=('OK'=>0,'WARNING'=>1,'CRITICAL'=>2,'UNKNOWN'=>3,'DEPENDENT'=>4); #my %ERRORS=('OK'=>0,'WARNING'=>1,'CRITICAL'=>2,'UNKNOWN'=>3,'DEPENDENT'=>4);
@ -448,11 +448,11 @@ if (defined ($o_fw)) {
if (defined($o_connSR)) { if (defined($o_connSR)) {
if ($$resultat{$connectionsSR} > $o_critSR) { if ($$resultat{$connectionsSR} > $o_critSR) {
$fw_state=3; $fw_state=3;
$fw_print .= "Connexions : ".$$resultat{$connectionsSR}." > ".$o_critSR." "; $fw_print .= "Conn/seg : ".$$resultat{$connectionsSR}." > ".$o_critSR." ";
} else { } else {
if ($$resultat{$connectionsSR} > $o_warnSR) { if ($$resultat{$connectionsSR} > $o_warnSR) {
if ($fw_state!=3) {$fw_state=1;} if ($fw_state!=3) {$fw_state=1;}
$fw_print .= "Connexions : ".$$resultat{$connectionsSR}." > ".$o_warnSR." "; $fw_print .= "Conn/seg : ".$$resultat{$connectionsSR}." > ".$o_warnSR." ";
} }
} }
$perf_conn=$$resultat{$connections}; $perf_conn=$$resultat{$connections};