Werk #13838: TCP fetcher: don't connect if no data is needed

Component Checks & agents
Title TCP fetcher: don't connect if no data is needed
Date Mar 29, 2022
Level Trivial Change
Class Bug Fix
Compatibility Compatible - no manual interaction needed
Checkmk versions & editions
2.2.0b1 Checkmk Raw (CRE), Checkmk Enterprise (CEE), Checkmk Cloud (CCE), Checkmk MSP (CME)
2.1.0b5 Checkmk Raw (CRE), Checkmk Enterprise (CEE), Checkmk MSP (CME)
2.0.0p23 Checkmk Raw (CRE), Checkmk Enterprise (CEE), Checkmk MSP (CME)

When fetching the data from a Checkmk agent (unix/windows), the fetcher would establish a connection before checking the cache file. If the cached data was still valid the connection has been closed.

These "unused" connections could lead to unwanted agent executions, which in turn can lead to lost logwatch messages or a flapping hardware/software inventory.

In Checkmk 2.1 it additionally lead to irritating errors in the log of cmk-agent-ctl on the monitored host, such as "Request failed: tls handshake eof" or "Request failed: Connection reset by peer (os error 104)".

To the list of all Werks