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.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/plugins/check_ntp_peer.c b/plugins/check_ntp_peer.c
index 5ed97db..67ee0a7 100644
--- a/plugins/check_ntp_peer.c
+++ b/plugins/check_ntp_peer.c
@@ -552,6 +552,9 @@ int main(int argc, char *argv[]){
552 bindtextdomain (PACKAGE, LOCALEDIR); 552 bindtextdomain (PACKAGE, LOCALEDIR);
553 textdomain (PACKAGE); 553 textdomain (PACKAGE);
554 554
555 /* Parse extra opts if any */
556 argv=np_extra_opts (&argc, argv, progname);
557
555 if (process_arguments (argc, argv) == ERROR) 558 if (process_arguments (argc, argv) == ERROR)
556 usage4 (_("Could not parse arguments")); 559 usage4 (_("Could not parse arguments"));
557 560
@@ -638,6 +641,7 @@ void print_help(void){
638 641
639 print_usage(); 642 print_usage();
640 printf (_(UT_HELP_VRSN)); 643 printf (_(UT_HELP_VRSN));
644 printf (_(UT_EXTRA_OPTS));
641 printf (_(UT_HOST_PORT), 'p', "123"); 645 printf (_(UT_HOST_PORT), 'p', "123");
642 printf (" %s\n", "-q, --quiet"); 646 printf (" %s\n", "-q, --quiet");
643 printf (" %s\n", _("Returns UNKNOWN instead of CRITICAL or WARNING if server isn't synchronized")); 647 printf (" %s\n", _("Returns UNKNOWN instead of CRITICAL or WARNING if server isn't synchronized"));
@@ -664,17 +668,23 @@ void print_help(void){
664 printf(" %s\n", _("Use this plugin to check the health of an NTP server. It supports")); 668 printf(" %s\n", _("Use this plugin to check the health of an NTP server. It supports"));
665 printf(" %s\n", _("checking the offset with the sync peer, the jitter and stratum. This")); 669 printf(" %s\n", _("checking the offset with the sync peer, the jitter and stratum. This"));
666 printf(" %s\n", _("plugin will not check the clock offset between the local host and NTP")); 670 printf(" %s\n", _("plugin will not check the clock offset between the local host and NTP"));
667 printf(" %s\n\n", _("server; please use check_ntp_time for that purpose.")); 671 printf(" %s\n", _("server; please use check_ntp_time for that purpose."));
668 672 printf("\n");
669 printf(_(UT_THRESHOLDS_NOTES)); 673 printf(_(UT_THRESHOLDS_NOTES));
674#ifdef NP_EXTRA_OPTS
675 printf("\n");
676 printf(_(UT_EXTRA_OPTS_NOTES));
677#endif
670 678
671 printf("\n"); 679 printf("\n");
672 printf("%s\n", _("Examples:")); 680 printf("%s\n", _("Examples:"));
673 printf(" %s\n", _("Simple NTP server check:")); 681 printf(" %s\n", _("Simple NTP server check:"));
674 printf(" %s\n", ("./check_ntp_peer -H ntpserv -w 0.5 -c 1")); 682 printf(" %s\n", ("./check_ntp_peer -H ntpserv -w 0.5 -c 1"));
683 printf("\n");
675 printf(" %s\n", _("Check jitter too, avoiding critical notifications if jitter isn't available")); 684 printf(" %s\n", _("Check jitter too, avoiding critical notifications if jitter isn't available"));
676 printf(" %s\n", _("(See Notes above for more details on thresholds formats):")); 685 printf(" %s\n", _("(See Notes above for more details on thresholds formats):"));
677 printf(" %s\n", ("./check_ntp_peer -H ntpserv -w 0.5 -c 1 -j -1:100 -k -1:200")); 686 printf(" %s\n", ("./check_ntp_peer -H ntpserv -w 0.5 -c 1 -j -1:100 -k -1:200"));
687 printf("\n");
678 printf(" %s\n", _("Check only stratum:")); 688 printf(" %s\n", _("Check only stratum:"));
679 printf(" %s\n", ("./check_ntp_peer -H ntpserv -W 4 -C 6")); 689 printf(" %s\n", ("./check_ntp_peer -H ntpserv -W 4 -C 6"));
680 690