[monitoring-plugins] check_ntp_time: fix time-offset argument and ...

Lorenz Kästle git at monitoring-plugins.org
Wed Nov 5 11:00:16 CET 2025


 Module: monitoring-plugins
 Branch: master
 Commit: cadcfaecbec56d2ecf44bb33bb394ca815240127
 Author: Lorenz Kästle <12514511+RincewindsHat at users.noreply.github.com>
   Date: Wed Nov  5 10:42:12 2025 +0100
    URL: https://www.monitoring-plugins.org/repositories/monitoring-plugins/commit/?id=cadcfaec

check_ntp_time: fix time-offset argument and description

---

 plugins/check_ntp_time.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/plugins/check_ntp_time.c b/plugins/check_ntp_time.c
index d554089d..8d97f2b9 100644
--- a/plugins/check_ntp_time.c
+++ b/plugins/check_ntp_time.c
@@ -511,7 +511,7 @@ static check_ntp_time_config_wrapper process_arguments(int argc, char **argv) {
 									   {"use-ipv4", no_argument, 0, '4'},
 									   {"use-ipv6", no_argument, 0, '6'},
 									   {"quiet", no_argument, 0, 'q'},
-									   {"time-offset", optional_argument, 0, 'o'},
+									   {"time-offset", required_argument, 0, 'o'},
 									   {"warning", required_argument, 0, 'w'},
 									   {"critical", required_argument, 0, 'c'},
 									   {"timeout", required_argument, 0, 't'},
@@ -682,7 +682,7 @@ void print_help(void) {
 	printf("    %s\n", _("Offset to result in warning status (seconds)"));
 	printf(" %s\n", "-c, --critical=THRESHOLD");
 	printf("    %s\n", _("Offset to result in critical status (seconds)"));
-	printf(" %s\n", "-o, --time_offset=INTEGER");
+	printf(" %s\n", "-o, --time-offset=INTEGER");
 	printf("    %s\n", _("Expected offset of the ntp server relative to local server (seconds)"));
 	printf(UT_CONN_TIMEOUT, DEFAULT_SOCKET_TIMEOUT);
 	printf(UT_VERBOSE);



More information about the Commits mailing list