Repository navigation
Conversation
w32tm output parsing used quote-aware tokenizing, so French key names with apostrophes (Ordinateur d'etat, Fréquence d'horloge, ...) were dropped and positional parsing read the wrong lines. Split w32tm lines on the first colon instead and add a real French Windows Server 2025 output as test case. Fixes ConSol-Monitoring#224
Contributor
|
Thanks, but we are working on a general solution already in |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #224.
On French Windows, check_ntp_offset always reported:
even when the clock was fine.
Root cause: the w32tm output parser split each line with a quote-aware
tokenizer. French key names contain apostrophes before the colon
(Ordinateur d'état :, Fréquence d'horloge :, ...), so those lines were
silently dropped and the positional fallback parser read the wrong
lines — attributes[11] ended up being the "Last Sync Error" line
instead of the state machine.
This change splits w32tm lines on the first colon without quote handling
(new splitW32Line helper, used by both parsers) and adds a test case
with real output captured from a French Windows Server 2025.
Checked against the real French output: without the fix the test shows
the exact bogus message from the issue, with the fix the check reports
the state machine line as it should.