<%- if scope.lookupvar('collectd::collectd_version_real') and (scope.function_versioncmp([scope.lookupvar('collectd::collectd_version_real'), '5.3']) >= 0) -%>
<Node "<%= @title %>">
<%- else -%>
<Carbon>
<%- end -%>
  Host "<%= @graphitehost %>"
  Port "<%= @graphiteport %>"
  Prefix "<%= @graphiteprefix %>"
<%- if @graphitepostfix -%>
  Postfix "<%= @graphitepostfix %>"
<%- end -%>
  EscapeCharacter "<%= @escapecharacter %>"
  StoreRates <%=  @storerates %>
  AlwaysAppendDS <%= @alwaysappendds %>
  SeparateInstances <%= @separateinstances %>
<%- if scope.lookupvar('collectd::collectd_version_real') and (scope.function_versioncmp([scope.lookupvar('collectd::collectd_version_real'), '5.4']) >= 0) -%>
  LogSendErrors <%= @logsenderrors %>
  Protocol "<%= @protocol %>"
<%- end -%>
<%- if scope.lookupvar('collectd::collectd_version_real') and (scope.function_versioncmp([scope.lookupvar('collectd::collectd_version_real'), '5.3']) >= 0) -%>
</Node>
<%- else -%>
</Carbon>
<%- end -%>

<%- if scope.lookupvar('collectd::collectd_version_real') and (scope.function_versioncmp([scope.lookupvar('collectd::collectd_version_real'), '5.3']) >= 0) -%>
<Node "<%= @title %>">
<%- else -%>
<Carbon>
<%- end -%>
  Host "<%= @graphitehost %>"
  Port "<%= @graphiteport %>"
  Prefix "<%= @graphiteprefix %>"
<%- if @graphitepostfix -%>
  Postfix "<%= @graphitepostfix %>"
<%- end -%>
  EscapeCharacter "<%= @escapecharacter %>"
  StoreRates <%=  @storerates %>
  AlwaysAppendDS <%= @alwaysappendds %>
  SeparateInstances <%= @separateinstances %>
<%- if scope.lookupvar('collectd::collectd_version_real') and (scope.function_versioncmp([scope.lookupvar('collectd::collectd_version_real'), '5.4']) >= 0) -%>
  LogSendErrors <%= @logsenderrors %>
  Protocol "<%= @protocol %>"
<%- end -%>
<%- if scope.lookupvar('collectd::collectd_version_real') and (scope.function_versioncmp([scope.lookupvar('collectd::collectd_version_real'), '5.6']) >= 0) -%>
  ReconnectInterval <%= @reconnectinterval %>
<%- end -%>
stores<%- if scope.lookupvar('collectd::collectd_version_real') and (scope.function_versioncmp([scope.lookupvar('collectd::collectd_version_real'), '5.3']) >= 0) -%>
</Node>
<%- else -%>
</Carbon>
<%- end -%>

Add ReconnectInterval parameter to write_graphite template (introduce in version 5.6, defaults to zero)
Add ReconnectInterval parameter to write_graphite template (introduce in version 5.6, defaults to zero)