From 19cd46194ab702c3efe276496e5a11de7623ec6b Mon Sep 17 00:00:00 2001 From: Julien Mathis Date: Tue, 24 Apr 2007 14:52:38 +0000 Subject: [PATCH] invert warning and critical git-svn-id: http://svn.centreon.com/Plugins/Dev@2204 6bcd3966-0018-0410-8128-fd23d134de7e --- src/check_graph_traffic.pl | 8 ++++---- src/check_oreon_snmp_traffic.pl | 7 ++++--- 2 files changed, 8 insertions(+), 7 deletions(-) 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);