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
Checkmk Edition Checkmk Raw (CRE)
Checkmk Version 2.0.0p23 2.1.0b5 2.2.0b1
Level Trivial Change
Class Bug Fix
Compatibility Compatible - no manual interaction needed

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