Skip to content

BUG REPORT: check_ntp_offset on Windows with french language #224

@k9fr4n

Description

@k9fr4n

Describe the bug
check_ntp_offset does not work when Windows is installed with French language
I think the response parsing of the command is not working

i got this respond:

CRITICAL - w32tm.exe: Erreur lors de la dernire synchronisation: 0 (La commande s'est termine correctement.) 

Screenshots
when i run the "w32tm.exe /query /status /verbose" command:

PS C:\Windows\system32> w32tm.exe /query /status /verbose
Indicateur de dérive : 0(Aucun avertissement)
Couche : 4 (Référence secondaire, synchronisée par (S)NTP)
Précision : -23 (119.209ns par battement)
Délai de racine : 0.0031091s
Dispersion de racine : 0.0483959s
ID de référence : 0xC0A88202 (IP de la source :  192.168.130.2)
Heure de la dernière synchronisation réussie : 14/04/2025 14:50:54
Source : APO-AD-03.domatel.local
Intervalle d’interrogation : 9 (512s)

Décalage de phase : -0.0001991s
Fréquence d’horloge : 0.0156249s
Ordinateur d’état : 2 (Synchroniser)
Indicateur de source de temps : 0 (Aucun)
Rôle de serveur : 576 (Service de temps fiable)
Erreur lors de la dernière synchronisation : 0 (La commande s’est terminée correctement.)
Durée écoulée depuis l’heure de la dernière synchronisation réussie : 70.4556861s

when i run the command manually everything works fine

some logs:

[2025-04-14 14:15:36.586][Trace][pid:23876][checkdata:134] finalize check results:
[2025-04-14 14:15:36.586][Debug][pid:23876][checkdata:142] filter:             none
[2025-04-14 14:15:36.586][Debug][pid:23876][checkdata:143] condition  warning: offset > 250 || offset < -250
[2025-04-14 14:15:36.586][Debug][pid:23876][checkdata:144] condition critical: offset > 500 || offset < -500
[2025-04-14 14:15:36.586][Debug][pid:23876][checkdata:145] condition       ok: none
[2025-04-14 14:15:36.586][Trace][pid:23876][checkdata:147] details: map[string]string{"_state":"0", "detail-syntax":"offset ${offset_seconds:duration} from ${server}", "empty-syntax":"%(status) - could not get any ntp data", "ok-syntax":"", "top-syntax":"%(status) - ${list}"}
[2025-04-14 14:15:36.586][Trace][pid:23876][checkdata:165] list data:
[2025-04-14 14:15:36.586][Trace][pid:23876][checkdata:177]  - map[string]string{"_error":"w32tm.exe: Erreur lors de la derni\x8are synchronisation\xff: 0 (La commande s'est termin\x82e correctement.)", "_exit":"2", "jitter":"", "offset":"", "offset_seconds":"", "server":"", "source":"w32tm", "stratum":""}
[2025-04-14 14:15:36.587][Debug][pid:23876][listener:328] nrpe connection from 10.200.13.4:42924 finished in 195.5582ms

Software (please complete the following information):

  • OS [Windows Server 2022 French]
  • Architecture [x86]
  • SNClient Version [v0.32]

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingenhancementNew feature or requesthelp wantedExtra attention is needed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions