# Generated by Puppet

<Plugin mysql>
  <Database "<%= @database %>">
    Host "<%= @host %>"
    User "<%= @username %>"
    Password "<%= @password %>"
<% if scope.function_versioncmp([scope.lookupvar('collectd::collectd_version_real'), '5.0']) >= 0 -%>
    Port "<%= @port %>"
<% else -%>
    Port <%= @port %>
<%- end -%>
    MasterStats <%= @masterstats %>
    SlaveStats <%= @slavestats %>
<%- if @socket -%>
    Socket "<%= @socket %>"
<%- end -%>
<% if scope.function_versioncmp([scope.lookupvar('collectd::collectd_version_real'), '5.5']) >= 0 -%>
<%- if not @aliasname.nil? -%>
    Alias "<%= @aliasname %>"
<%- end -%>
<%- if not @connecttimeout.nil? -%>
    ConnectTimeout <%= @connecttimeout %>
<%- end -%>
<%- if not @innodbstats.nil? -%>
    InnodbStats <%= @innodbstats %>
<%- end -%>
<%- if not @wsrepstats.nil? -%>
    WsrepStats <%= @wsrepstats %>
<%- end -%>
<%- end -%>
<%- if not @slavenotifications.nil? -%>
    SlaveNotifications <%= @slavenotifications %>
<%- end -%>
<% if scope.function_versioncmp([scope.lookupvar('collectd::collectd_version_real'), '5.6']) >= 0 -%>
<%- if not @sslkey.nil? -%>
    SSLKey "<%= @sslkey %>"
<%- end -%>
<%- if not @sslcert.nil? -%>
    SSLCert "<%= @sslcert %>"
<%- end -%>
<%- if not @sslca.nil? -%>
    SSLCA "<%= @sslca %>"
<%- end -%>
<%- if not @sslcapath.nil? -%>
    SSLCAPath "<%= @sslcapath %>"
<%- end -%>
<%- if not @sslcipher.nil? -%>
    SSLCipher "<%= @sslcipher %>"
<%- end -%>
<%- end -%>
  </Database>
</Plugin>
