separated code for communicating with munin into its own file