Module: monitoring-plugins
Branch: master
Commit: 7b226257b7df01dd80af07c39e0f49fdcf84cee4
Author: Lorenz Kästle <[email protected]>
Date: Wed Nov 5 10:42:43 2025 +0100
URL:
https://www.monitoring-plugins.org/repositories/monitoring-plugins/commit/?id=7b226257
check_ntp_time: reduce number of significant bits a bit
---
plugins/check_ntp_time.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/plugins/check_ntp_time.c b/plugins/check_ntp_time.c
index 8d97f2b9..7c3fc24d 100644
--- a/plugins/check_ntp_time.c
+++ b/plugins/check_ntp_time.c
@@ -643,11 +643,12 @@ int main(int argc, char *argv[]) {
mp_exit(overall);
}
- xasprintf(&sc_offset.output, "Offset: %.10g s", offset_result.offset);
+ xasprintf(&sc_offset.output, "Offset: %.6fs", offset_result.offset);
mp_perfdata pd_offset = perfdata_init();
pd_offset = mp_set_pd_value(pd_offset, fabs(offset_result.offset));
pd_offset.label = "offset";
+ pd_offset.uom = "s";
pd_offset = mp_pd_set_thresholds(pd_offset, config.offset_thresholds);
sc_offset = mp_set_subcheck_state(sc_offset,
mp_get_pd_status(pd_offset));