fix the $real_nagios_server variable, this should be $nagios_server as $real_ is not defined anywhere