[checkmk-commits] Extracted more code from fetch_data()