<Plugin amqp>
  <Publish "graphite">
    Host "<%= @amqphost %>"
    Port "<%= @amqpport %>"
    VHost "<%= @amqpvhost%>"
    User "<%= @amqpuser %>"
    Password "<%= @amqppass %>"
    Format "<%= @amqpformat %>"
<% if @amqpstorerates and @amqformat == 'JSON' -%>
    StoreRates true
<% else -%>
    StoreRates false
<% end -%>
    Exchange "<%= @amqpexchange %>"
    Persistent <%= @amqppersistent %>
    GraphitePrefix "<%= @graphiteprefix %>"
    GraphiteEscapeChar "<%= @escapecharacter %>"
<% if scope.lookupvar('collectd::collectd_version_real') and (scope.function_versioncmp([scope.lookupvar('collectd::collectd_version_real'), '5.4']) >= 0) -%>
<%   if @graphiteseparateinstances -%>
    GraphiteSeparateInstances <%= @graphiteseparateinstances %>
<%   end -%>
<%   if @graphitealwaysappendds -%>
    GraphiteAlwaysAppendDS <%= @graphitealwaysappendds %>
<%   end -%>
<% end -%>
  </Publish>
</Plugin>

<Plugin amqp>
  <Publish "graphite">
    Host "<%= @amqphost %>"
    Port "<%= @amqpport %>"
    VHost "<%= @amqpvhost%>"
    User "<%= @amqpuser %>"
    Password "<%= @amqppass %>"
    Format "<%= @amqpformat %>"
<% if @amqpstorerates and @amqpformat == 'JSON' -%>
    StoreRates true
<% else -%>
    StoreRates false
<% end -%>
    Exchange "<%= @amqpexchange %>"
    Persistent <%= @amqppersistent %>
    GraphitePrefix "<%= @graphiteprefix %>"
    GraphiteEscapeChar "<%= @escapecharacter %>"
<% if scope.lookupvar('collectd::collectd_version_real') and (scope.function_versioncmp([scope.lookupvar('collectd::collectd_version_real'), '5.4']) >= 0) -%>
<%   if @graphiteseparateinstances -%>
    GraphiteSeparateInstances <%= @graphiteseparateinstances %>
<%   end -%>
<%   if @graphitealwaysappendds -%>
    GraphiteAlwaysAppendDS <%= @graphitealwaysappendds %>
<%   end -%>
<% end -%>
  </Publish>
</Plugin>

Fix a bug in the template found by the new spec tests
Fix a bug in the template found by the new spec tests
