Werk #19201: win_netstat: fix crash on Windows-specific TCP connection states
| Component | Checks & agents | ||
| Title | win_netstat: fix crash on Windows-specific TCP connection states | ||
| Date | May 6, 2026 | ||
| Level | Trivial Change | ||
| Class | Bug Fix | ||
| Compatibility | Compatible - no manual interaction needed | ||
| Checkmk versions & editions |
|
The win_netstat check plugin crashed with a KeyError when parsing TCP
connections in the FIN_WAIT_1 or FIN_WAIT_2 state. Windows netstat
reports these states with an underscore before the digit (FIN_WAIT_1,
FIN_WAIT_2), while the internal ConnectionState enum uses the Linux
convention without the underscore (FIN_WAIT1, FIN_WAIT2). The mismatch
caused a crash during section parsing. This issue was introduced in
Checkmk 2.5.0 when the plugin was migrated from plain string tuples to
typed ConnectionState enum values.
Starting with this release, the state name mapping correctly translates the
Windows-specific FIN_WAIT_1 and FIN_WAIT_2 values to their enum
equivalents, and the plugin also handles the German-locale states
SYN_GESENDET and SYN_EMPFANGEN (the German translations of SYN_SENT
and SYN_RECV on localized Windows systems).