Werk #18610: msexch_database: Support all locales with comma decimal separator for Exchange database latency metrics
| Component | Checks & agents | ||||||
| Title | msexch_database: Support all locales with comma decimal separator for Exchange database latency metrics | ||||||
| Date | Oct 17, 2025 | ||||||
| Level | Trivial Change | ||||||
| Class | Bug Fix | ||||||
| Compatibility | Compatible - no manual interaction needed | ||||||
| Checkmk versions & editions |
|
The Exchange Database check plugin (msexch_database) now correctly parses performance data from all locales that use a comma as the decimal separator, not just the German locale.
It previously supported only the German locale (de-DE) for comma-separated decimal numbers. When agents reported data using other locales such as French Swiss (fr-CH), French (fr-FR), Italian (it-IT), Spanish (es-ES), Dutch (nl-NL), or any other locale with comma decimal notation, the plugin failed to parse latency values, resulting in missing metrics.
The updated implementation introduces a three-tier parsing approach:
Primary method: The PowerShell agent plugin now explicitly provides the decimal separator used by the Windows system:
separator; , # European format (German, French, etc.)
separator; . # US/UK format
When this information is available, a robust regex-based parser removes all thousands separators (dots, commas, quotes, spaces) while preserving only digits and the actual decimal separator.
Locale-based fallback: When separator information is not available but locale is provided, the parser uses locale-specific regex patterns to determine the appropriate decimal format based on known locale conventions.
Positional fallback: For backward compatibility with older agent data that provides neither separator nor locale information, the check uses positional logic to detect the number format by analyzing the positions of the last comma and dot in the value.
As a result, Exchange database latency metrics—including read attached, read recovery, write attached, and log write latencies—are now properly collected and monitored on systems using any non-English locale with comma decimal notation. Affected locales include, but are not limited to, de-DE, fr-CH, fr-FR, it-IT, es-ES, nl-NL, pt-PT, da-DK, sv-SE, no-NO, and fi-FI.
The change is fully backward compatible with existing agent installations, gracefully degrading from explicit separator detection to locale-aware parsing to positional detection as needed.