I see you added the logic , but you forgot to remove the 
:type => settings['logstash']['type']
line from the original commit

tnx