1
0
mirror of https://github.com/opinkerfi/nagios-plugins.git synced 2024-11-21 18:03:45 +01:00

warn/crit threshold 4 connRate, warning/crit output improvement

This commit is contained in:
monitoreoDotOsiAtUchileDotCl 2020-10-28 12:17:15 -03:00
parent ac1f45311e
commit 21c7874418

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 :
@ -21,7 +21,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;
@ -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};