From 16373ffa48479eb83b96b20add87b80f95902819 Mon Sep 17 00:00:00 2001 From: Julien Mathis Date: Tue, 2 Nov 2010 12:34:23 +0000 Subject: [PATCH] when arguments are missing or are not ok, return UNKNOWN git-svn-id: http://svn.centreon.com/trunk/plugins-2.x@11008 6bcd3966-0018-0410-8128-fd23d134de7e --- centreon-plugins/src/check_centreon_snmp_loadaverage | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/centreon-plugins/src/check_centreon_snmp_loadaverage b/centreon-plugins/src/check_centreon_snmp_loadaverage index ab7c98a62..99f54edff 100644 --- a/centreon-plugins/src/check_centreon_snmp_loadaverage +++ b/centreon-plugins/src/check_centreon_snmp_loadaverage @@ -118,13 +118,13 @@ if ($opt_w && $opt_w =~ /^([0-9]+),([0-9]+),([0-9]+)$/) { @warning = ('1', '3', '5'); } else { print "Specify three warning treshold separated with a coma\n"; - exit $ERRORS{'OK'}; + exit $ERRORS{'UNKNOWN'}; } for (my $i = 0; $i < scalar(@warning); $i++) { if ($warning[$i] >= $critical[$i]) { print "Critical tresholds must be superior to warning tresholds.\n"; - exit $ERRORS{'OK'}; + exit $ERRORS{'UNKNOWN'}; } } @@ -135,10 +135,10 @@ if ($snmp eq "3") { } if (!$opt_p && !$opt_k) { print "Option -k (--key) or -p (--password) is required for snmpV3\n"; - exit $ERRORS{'OK'}; + exit $ERRORS{'UNKNOWN'}; } elsif ($opt_p && $opt_k) { print "Only option -k (--key) or -p (--password) is needed for snmpV3\n"; - exit $ERRORS{'OK'}; + exit $ERRORS{'UNKNOWN'}; } }