"type" is not mandatory in @version 1 , so i'd add it only if settings['logstash'].has_key?('type')