summaryrefslogtreecommitdiffstats
path: root/plugins/check_ntp_peer.c
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/check_ntp_peer.c')
-rw-r--r--plugins/check_ntp_peer.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/plugins/check_ntp_peer.c b/plugins/check_ntp_peer.c
index 4fb9018..464a9e1 100644
--- a/plugins/check_ntp_peer.c
+++ b/plugins/check_ntp_peer.c
@@ -558,7 +558,6 @@ char *perfd_truechimers (int num_truechimers)
558 558
559int main(int argc, char *argv[]){ 559int main(int argc, char *argv[]){
560 int result, offset_result, stratum, num_truechimers; 560 int result, offset_result, stratum, num_truechimers;
561 int oresult, jresult, sresult, tresult = STATE_UNKNOWN;
562 double offset=0, jitter=0; 561 double offset=0, jitter=0;
563 char *result_line, *perfdata_line; 562 char *result_line, *perfdata_line;
564 563
@@ -595,18 +594,28 @@ int main(int argc, char *argv[]){
595 result = STATE_UNKNOWN; 594 result = STATE_UNKNOWN;
596 result = max_state_alt(result, get_status(fabs(offset), offset_thresholds)); 595 result = max_state_alt(result, get_status(fabs(offset), offset_thresholds));
597 } 596 }
598 oresult = result; 597
598 int oresult = result;
599
600
601 int tresult = STATE_UNKNOWN;
599 602
600 if(do_truechimers) { 603 if(do_truechimers) {
601 tresult = get_status(num_truechimers, truechimer_thresholds); 604 tresult = get_status(num_truechimers, truechimer_thresholds);
602 result = max_state_alt(result, tresult); 605 result = max_state_alt(result, tresult);
603 } 606 }
604 607
608
609 int sresult = STATE_UNKNOWN;
610
605 if(do_stratum) { 611 if(do_stratum) {
606 sresult = get_status(stratum, stratum_thresholds); 612 sresult = get_status(stratum, stratum_thresholds);
607 result = max_state_alt(result, sresult); 613 result = max_state_alt(result, sresult);
608 } 614 }
609 615
616
617 int jresult = STATE_UNKNOWN;
618
610 if(do_jitter) { 619 if(do_jitter) {
611 jresult = get_status(jitter, jitter_thresholds); 620 jresult = get_status(jitter, jitter_thresholds);
612 result = max_state_alt(result, jresult); 621 result = max_state_alt(result, jresult);