<% if @nodes -%>
<Plugin redis>
<%   @nodes.each do |name,params| -%>
  <Node "<%= name %>">
<%     if params['host'] -%>
    Host "<%= params['host'] %>"
<%     end -%>
<%     if params['port'] -%>
    Port "<%= params['port'] %>"
<%     end -%>
<%     if params['timeout'] -%>
    Timeout <%= params['timeout'] %>
<%     end -%>
<%     if params['password'] -%>
    Password "<%= params['password'] %>"
<%     end -%>
<%     if params['queries'] -%>
<%       params['queries'].each do |instance,qparams| -%>
    <Query "<%= qparams['query'] -%>">
      Type "<%= qparams['type'] -%>"
      Instance "<%= instance -%>"
    </Query>
<%       end -%>
<%     end -%>
  </Node>
<%   end -%>
</Plugin>
<% end -%>
