From d5909817ff65953dab9538bd19ec36f338c3e232 Mon Sep 17 00:00:00 2001 From: Markus Frei Date: Tue, 3 Sep 2024 13:36:41 +0200 Subject: [PATCH] ntp-w32tm: Add missing WARN state --- check-plugins/ntp-w32tm/ntp-w32tm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/check-plugins/ntp-w32tm/ntp-w32tm b/check-plugins/ntp-w32tm/ntp-w32tm index d620ce71..8f0d71dc 100755 --- a/check-plugins/ntp-w32tm/ntp-w32tm +++ b/check-plugins/ntp-w32tm/ntp-w32tm @@ -24,7 +24,7 @@ from lib.globals import (STATE_CRIT, STATE_OK, # pylint: disable=C0413 STATE_UNKNOWN, STATE_WARN) __author__ = 'Linuxfabrik GmbH, Zurich/Switzerland' -__version__ = '2024021501' +__version__ = '2024090201' DESCRIPTION = '''This monitoring plugin runs `w32tm /query /status /verbose` (Windows) to help diagnose problems with the time settings.''' @@ -115,6 +115,7 @@ def main(): peer_used = stratum != 0 if not peer_used: msg.append('No NTP server used {}'.format(lib.base.state2str(STATE_WARN))) + state = STATE_WARN if stratum > 4: msg.append('{} {}'.format(line, lib.base.state2str(STATE_WARN))) state = STATE_WARN