def connection_params(host, port)
  
        params = {}
  
        if !host.nil?
          params[:host] = host
        elsif !Nagios::Connection.instance.host.nil?
          params[:host] = Nagios::Connection.instance.host
        else
          raise ArgumentError, "You must provide a Nagios host or use Nagios::Connection"
        end

        if !port.nil?
          params[:port] = port
        elsif !Nagios::Connection.instance.port.nil?
          params[:port] = Nagios::Connection.instance.port
        else
          raise ArgumentError, "You must provide a Nagios port or use Nagios::Connection"
        end

        return params
      end
def connection_params(host, port)
  
        params = {}
  
        if !host.nil?
          params[:host] = host
        elsif !Nagios::Connection.instance.host.nil?
          params[:host] = Nagios::Connection.instance.host
        else
          raise ArgumentError, "You must provide a Nagios host or use Nagios::Connection"
        end

        if !port.nil?
          params[:port] = port
        elsif !Nagios::Connection.instance.port.nil?
          params[:port] = Nagios::Connection.instance.port
        else
          raise ArgumentError, "You must provide a Nagios port or use Nagios::Connection"
        end

        return params
      end
check that we have the Nagios server details