[checkmk-commits] Move code needed for Nagios config generation into own file