Code

bug fix
[nagiosplug.git] / plugins-scripts / check_ntp.pl
index 17730a59f8f4cfac9b29ae302a0dbb080a10c712..10079b693b4afa2b3cbfe21b8b55bc28df60e161 100755 (executable)
@@ -138,10 +138,13 @@ if ($ocrit < $owarn ) {
        print_usage();
        exit $ERRORS{"UNKNOWN"};
 }
-if ($opt_k < $opt_j) {
-       print "Critical jitter should be larger than warning jitter\n";
-       print_usage();
-       exit $ERRORS{'UNKNOWN'};
+
+if ($def_jitter) {
+       if ($opt_k < $opt_j) {
+               print "Critical jitter should be larger than warning jitter\n";
+               print_usage();
+               exit $ERRORS{'UNKNOWN'};
+       }
 }