aboutsummaryrefslogtreecommitdiff
path: root/plugins-scripts/check_ntp.pl
diff options
context:
space:
mode:
Diffstat (limited to 'plugins-scripts/check_ntp.pl')
-rwxr-xr-xplugins-scripts/check_ntp.pl11
1 files changed, 7 insertions, 4 deletions
diff --git a/plugins-scripts/check_ntp.pl b/plugins-scripts/check_ntp.pl
index 17730a59..10079b69 100755
--- a/plugins-scripts/check_ntp.pl
+++ b/plugins-scripts/check_ntp.pl
@@ -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'};
+ }
}