added icinga_plugin api handling and treshold checking