diff --git a/src/check_graph_traffic.pl b/src/check_graph_traffic.pl index e9629f1ef..ec2c0a08d 100644 --- a/src/check_graph_traffic.pl +++ b/src/check_graph_traffic.pl @@ -400,14 +400,14 @@ $out_perfparse_traffic_str =~ s/\./,/g; my $status = "OK"; -if (($in_usage > $critical) or ($out_usage > $critical)){ - $status = "CRITICAL"; -} - if(($in_usage > $warning) or ($out_usage > $warning)){ $status = "WARNING"; } +if (($in_usage > $critical) or ($out_usage > $critical)){ + $status = "CRITICAL"; +} + printf("Traffic In : %.2f ".$in_prefix."b/s (".$in_usage." %%), Out : %.2f ".$out_prefix."b/s (".$out_usage." %%) - ", $in_traffic, $out_traffic); printf("Total RX Bits In : %.2f ".$in_bits_unit."B, Out : %.2f ".$out_bits_unit."b", $in_bits, $out_bits); diff --git a/src/check_oreon_snmp_traffic.pl b/src/check_oreon_snmp_traffic.pl index 28464813f..e90ec2d05 100644 --- a/src/check_oreon_snmp_traffic.pl +++ b/src/check_oreon_snmp_traffic.pl @@ -353,13 +353,14 @@ $out_perfparse_traffic_str =~ s/\./,/g; my $status = "OK"; +if(($in_usage > $warning) or ($out_usage > $warning)){ + $status = "WARNING"; +} + if (($in_usage > $critical) or ($out_usage > $critical)){ $status = "CRITICAL"; } -if(($in_usage > $warning) or ($out_usage > $warning)){ - $status = "WARNING"; -} printf("Traffic In : %.2f ".$in_prefix."b/s (".$in_usage." %%), Out : %.2f ".$out_prefix."b/s (".$out_usage." %%) - ", $in_traffic, $out_traffic); printf("Total RX Bits In : %.2f ".$in_bits_unit."B, Out : %.2f ".$out_bits_unit."b", $in_bits, $out_bits);