[monitoring-plugins] Forgot to actually set thresholds

Lorenz Kästle git at monitoring-plugins.org
Wed Nov 5 12:20:12 CET 2025


 Module: monitoring-plugins
 Branch: master
 Commit: 697374af93322fdd584a219e0cf45021b463404e
 Author: Lorenz Kästle <12514511+RincewindsHat at users.noreply.github.com>
   Date: Tue Nov  4 12:11:24 2025 +0100
    URL: https://www.monitoring-plugins.org/repositories/monitoring-plugins/commit/?id=697374af

Forgot to actually set thresholds

---

 plugins/check_ntp_peer.c | 24 ++++++++++++++++--------
 1 file changed, 16 insertions(+), 8 deletions(-)

diff --git a/plugins/check_ntp_peer.c b/plugins/check_ntp_peer.c
index 0498a7d4..68b2fa9c 100644
--- a/plugins/check_ntp_peer.c
+++ b/plugins/check_ntp_peer.c
@@ -527,7 +527,8 @@ check_ntp_peer_config_wrapper process_arguments(int argc, char **argv) {
 				die(STATE_UNKNOWN, "failed to parse warning offset threshold");
 			}
 
-			mp_thresholds_set_warn(result.config.offset_thresholds, tmp.range);
+			result.config.offset_thresholds =
+				mp_thresholds_set_warn(result.config.offset_thresholds, tmp.range);
 		} break;
 		case 'c': {
 			mp_range_parsed tmp = mp_parse_range_string(optarg);
@@ -535,7 +536,8 @@ check_ntp_peer_config_wrapper process_arguments(int argc, char **argv) {
 				die(STATE_UNKNOWN, "failed to parse critical offset threshold");
 			}
 
-			mp_thresholds_set_crit(result.config.offset_thresholds, tmp.range);
+			result.config.offset_thresholds =
+				mp_thresholds_set_crit(result.config.offset_thresholds, tmp.range);
 		} break;
 		case 'W': {
 			result.config.do_stratum = true;
@@ -544,7 +546,8 @@ check_ntp_peer_config_wrapper process_arguments(int argc, char **argv) {
 				die(STATE_UNKNOWN, "failed to parse warning stratum threshold");
 			}
 
-			mp_thresholds_set_warn(result.config.stratum_thresholds, tmp.range);
+			result.config.stratum_thresholds =
+				mp_thresholds_set_warn(result.config.stratum_thresholds, tmp.range);
 		} break;
 		case 'C': {
 			result.config.do_stratum = true;
@@ -553,7 +556,8 @@ check_ntp_peer_config_wrapper process_arguments(int argc, char **argv) {
 				die(STATE_UNKNOWN, "failed to parse critical stratum threshold");
 			}
 
-			mp_thresholds_set_crit(result.config.stratum_thresholds, tmp.range);
+			result.config.stratum_thresholds =
+				mp_thresholds_set_crit(result.config.stratum_thresholds, tmp.range);
 		} break;
 		case 'j': {
 			result.config.do_jitter = true;
@@ -562,7 +566,8 @@ check_ntp_peer_config_wrapper process_arguments(int argc, char **argv) {
 				die(STATE_UNKNOWN, "failed to parse warning jitter threshold");
 			}
 
-			mp_thresholds_set_warn(result.config.jitter_thresholds, tmp.range);
+			result.config.jitter_thresholds =
+				mp_thresholds_set_warn(result.config.jitter_thresholds, tmp.range);
 		} break;
 		case 'k': {
 			result.config.do_jitter = true;
@@ -571,7 +576,8 @@ check_ntp_peer_config_wrapper process_arguments(int argc, char **argv) {
 				die(STATE_UNKNOWN, "failed to parse critical jitter threshold");
 			}
 
-			mp_thresholds_set_crit(result.config.jitter_thresholds, tmp.range);
+			result.config.jitter_thresholds =
+				mp_thresholds_set_crit(result.config.jitter_thresholds, tmp.range);
 		} break;
 		case 'm': {
 			result.config.do_truechimers = true;
@@ -580,7 +586,8 @@ check_ntp_peer_config_wrapper process_arguments(int argc, char **argv) {
 				die(STATE_UNKNOWN, "failed to parse warning truechimer threshold");
 			}
 
-			mp_thresholds_set_warn(result.config.truechimer_thresholds, tmp.range);
+			result.config.truechimer_thresholds =
+				mp_thresholds_set_warn(result.config.truechimer_thresholds, tmp.range);
 		} break;
 		case 'n': {
 			result.config.do_truechimers = true;
@@ -589,7 +596,8 @@ check_ntp_peer_config_wrapper process_arguments(int argc, char **argv) {
 				die(STATE_UNKNOWN, "failed to parse critical truechimer threshold");
 			}
 
-			mp_thresholds_set_crit(result.config.truechimer_thresholds, tmp.range);
+			result.config.truechimer_thresholds =
+				mp_thresholds_set_crit(result.config.truechimer_thresholds, tmp.range);
 		} break;
 		case 'H':
 			if (!is_host(optarg)) {



More information about the Commits mailing list