From 21c787441823aff9491df967e4df504ea492da48 Mon Sep 17 00:00:00 2001 From: monitoreoDotOsiAtUchileDotCl Date: Wed, 28 Oct 2020 12:17:15 -0300 Subject: [PATCH 1/2] warn/crit threshold 4 connRate, warning/crit output improvement --- check_snmp/check_snmp_cpfw.pl | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/check_snmp/check_snmp_cpfw.pl b/check_snmp/check_snmp_cpfw.pl index 3d5750c..3b800e8 100755 --- a/check_snmp/check_snmp_cpfw.pl +++ b/check_snmp/check_snmp_cpfw.pl @@ -5,7 +5,7 @@ # Author : Patrick Proy (patrick at proy.org) # Help : http://nagios.manubulon.com # Licence : GPL - http://www.fsf.org/licenses/gpl.txt -# Patch 1.2.1b +# Patch 1.2.1c # Author : monitoreo.osi@uchile.cl # Desc: warn/crit threshold to conns/seg check # TODO : @@ -21,7 +21,7 @@ use Getopt::Long; # Nagios specific -use lib "/usr/local/nagios/libexec"; +#use lib "/usr/local/nagios/libexec"; use lib "/usr/lib/nagios/plugins"; # use in ubugtu use utils qw(%ERRORS $TIMEOUT); #my $TIMEOUT = 15; @@ -448,11 +448,11 @@ if (defined ($o_fw)) { if (defined($o_connSR)) { if ($$resultat{$connectionsSR} > $o_critSR) { $fw_state=3; - $fw_print .= "Connexions : ".$$resultat{$connectionsSR}." > ".$o_critSR." "; + $fw_print .= "Conn/seg : ".$$resultat{$connectionsSR}." > ".$o_critSR." "; } else { if ($$resultat{$connectionsSR} > $o_warnSR) { 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}; From 36582886c9ce4e5c5f62d4ba8d0c3841620af337 Mon Sep 17 00:00:00 2001 From: monitoreoDotOsiAtUchileDotCl Date: Wed, 28 Oct 2020 12:24:56 -0300 Subject: [PATCH 2/2] warn/crit threshold 4 connRate, warning/crit output improvement --- check_snmp/check_snmp_cpfw.pl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/check_snmp/check_snmp_cpfw.pl b/check_snmp/check_snmp_cpfw.pl index 3b800e8..6f3adeb 100755 --- a/check_snmp/check_snmp_cpfw.pl +++ b/check_snmp/check_snmp_cpfw.pl @@ -21,8 +21,8 @@ use Getopt::Long; # Nagios specific -#use lib "/usr/local/nagios/libexec"; -use lib "/usr/lib/nagios/plugins"; # use in ubugtu +use lib "/usr/local/nagios/libexec"; +#use lib "/usr/lib/nagios/plugins"; # use in ubugtu use utils qw(%ERRORS $TIMEOUT); #my $TIMEOUT = 15; #my %ERRORS=('OK'=>0,'WARNING'=>1,'CRITICAL'=>2,'UNKNOWN'=>3,'DEPENDENT'=>4);