### Option: Plugins.Mysql.CallTimeout
#	The maximum time in seconds for waiting when a request has to be done.
#
# Mandatory: no
# Range: 1-30
# Default:
# Plugins.Mysql.CallTimeout=<Global timeout>
{% if agent_param_plugins_mysql_calltimeout  is defined and agent_param_plugins_mysql_calltimeout %}

Plugins.Mysql.CallTimeout={{ agent_param_plugins_mysql_calltimeout }}
{% endif %}

### Option: Plugins.Mysql.Timeout
#	The maximum time in seconds for waiting when a connection has to be established.
#
# Mandatory: no
# Range: 1-30
# Default: global timeout
{% if agent_param_plugins_mysql_timeout  is defined and agent_param_plugins_mysql_timeout %}

Plugins.Mysql.Timeout={{ agent_param_plugins_mysql_timeout }}
{% endif %}

### Option: Plugins.Mysql.CustomQueriesPath
#	Full pathname of a directory containing *.sql* files with custom queries.
#
# Mandatory: no
# Default:
# Plugins.Mysql.CustomQueriesPath=
{% if agent_param_plugins_mysql_customqueriespath  is defined and agent_param_plugins_mysql_customqueriespath %}

Plugins.Mysql.CustomQueriesPath={{ agent_param_plugins_mysql_customqueriespath }}
{% endif %}

### Option: Plugins.Mysql.KeepAlive
#	Time (in seconds) to wait before unused connections will be closed.
#
# Mandatory: no
# Range: 60-900
# Default:
# Plugins.Mysql.KeepAlive=300
{% if agent_param_plugins_mysql_keepalive  is defined and agent_param_plugins_mysql_keepalive %}

Plugins.Mysql.KeepAlive={{ agent_param_plugins_mysql_keepalive }}
{% endif %}

### Option: Plugins.Mysql.Sessions.*.Uri
#	Connection string. "*" should be replaced with a session name.
#
# Mandatory: no
# Range: Must matches the URI format.
# Default:
# Plugins.Mysql.Sessions.*.Uri=
{% if agent_param_plugins_mysql_sessions is defined and agent_param_plugins_mysql_sessions is iterable and agent_param_plugins_mysql_sessions is not string and agent_param_plugins_mysql_sessions is not mapping %}

{% for session in agent_param_plugins_mysql_sessions %}
{% if session["uri"] is defined and session["uri"] %}
Plugins.Mysql.Sessions.{{ session["name"] }}.Uri={{ session["uri"] }}
{% endif %}
{% endfor %}
{% endif %}

### Option: Plugins.Mysql.Sessions.*.User
#	Username to be used for MySQL authentication. "*" should be replaced with a session name.
#
# Mandatory: no
# Default:
# Plugins.Mysql.Sessions.*.User=
{% if agent_param_plugins_mysql_sessions is defined and agent_param_plugins_mysql_sessions is iterable and agent_param_plugins_mysql_sessions is not string and agent_param_plugins_mysql_sessions is not mapping %}

{% for session in agent_param_plugins_mysql_sessions %}
{% if session["user"] is defined and session["user"] %}
Plugins.Mysql.Sessions.{{ session["name"] }}.User={{ session["user"] }}
{% endif %}
{% endfor %}
{% endif %}

### Option: Plugins.Mysql.Sessions.*.Password
#	Password to be used for MySQL authentication. "*" should be replaced with a session name.
#
# Mandatory: no
# Default:
# Plugins.Mysql.Sessions.*.Password=
{% if agent_param_plugins_mysql_sessions is defined and agent_param_plugins_mysql_sessions is iterable and agent_param_plugins_mysql_sessions is not string and agent_param_plugins_mysql_sessions is not mapping %}

{% for session in agent_param_plugins_mysql_sessions %}
{% if session["password"] is defined and session["password"] %}
Plugins.Mysql.Sessions.{{ session["name"] }}.Password={{ session["password"] }}
{% endif %}
{% endfor %}
{% endif %}

### Option: Plugins.Mysql.Sessions.*.TLSConnect
#	Encryption type for MySQL connection. "*" should be replaced with a session name.
#		tls connection required     - required
#		verifies certificates       - verify_ca
#		verify certificates and ip  - verify_full
#
# Mandatory: no
# Default:
# Plugins.Mysql.Sessions.*.TLSConnect=
{% if agent_param_plugins_mysql_sessions is defined and agent_param_plugins_mysql_sessions is iterable and agent_param_plugins_mysql_sessions is not string and agent_param_plugins_mysql_sessions is not mapping %}

{% for session in agent_param_plugins_mysql_sessions %}
{% if session["tlsconnect"] is defined and session["tlsconnect"] %}
Plugins.Mysql.Sessions.{{ session["name"] }}.TLSConnect={{ session["tlsconnect"] }}
{% endif %}
{% endfor %}
{% endif %}

### Option: Plugins.Mysql.Sessions.*.TLSCAFile
#	Full pathname of a file containing the top-level CA(s) certificates for mysql
#	peer certificate verification.
#
# Mandatory: no
# Default:
# Plugins.Mysql.Sessions.*.TLSCAFile=
{% if agent_internal_plugins_mysql_tls_file_list is defined and agent_internal_plugins_mysql_tls_file_list is iterable and agent_internal_plugins_mysql_tls_file_list is not string and agent_internal_plugins_mysql_tls_file_list is not mapping %}

{% for tls_file in agent_internal_plugins_mysql_tls_file_list %}
{% if tls_file["type"] == "ca" %}
Plugins.Mysql.Sessions.{{ tls_file["session_name"] }}.TLSCAFile={{ tls_file["target"] }}
{% endif %}
{% endfor %}
{% endif %}

### Option: Plugins.Mysql.Sessions.*.TLSCertFile
#	Full pathname of a file containing the mysql certificate or certificate chain.
#
# Mandatory: no
# Default:
# Plugins.Mysql.Sessions.*.TLSCertFile=
{% if agent_internal_plugins_mysql_tls_file_list is defined and agent_internal_plugins_mysql_tls_file_list is iterable and agent_internal_plugins_mysql_tls_file_list is not string and agent_internal_plugins_mysql_tls_file_list is not mapping %}

{% for tls_file in agent_internal_plugins_mysql_tls_file_list %}
{% if tls_file["type"] == "cert" %}
Plugins.Mysql.Sessions.{{ tls_file["session_name"] }}.TLSCertFile={{ tls_file["target"] }}
{% endif %}
{% endfor %}
{% endif %}

### Option: Plugins.Mysql.Sessions.*.TLSKeyFile
#	Full pathname of a file containing the mysql private key.
#
# Mandatory: no
{% if agent_internal_plugins_mysql_tls_file_list is defined and agent_internal_plugins_mysql_tls_file_list is iterable and agent_internal_plugins_mysql_tls_file_list is not string and agent_internal_plugins_mysql_tls_file_list is not mapping %}

{% for tls_file in agent_internal_plugins_mysql_tls_file_list %}
{% if tls_file["type"] == "key" %}
Plugins.Mysql.Sessions.{{ tls_file["session_name"] }}.TLSKeyFile={{ tls_file["target"] }}
{% endif %}
{% endfor %}
{% endif %}

### Option: Plugins.Mysql.Default.Uri
#	Connection string. Default value used if no other is specified.
#
# Mandatory: no
# Range: Must matches the URI format.
# Default:
# Plugins.Mysql.Default.Uri=
{% if agent_param_plugins_mysql_default is defined and agent_param_plugins_mysql_default.uri is defined and agent_param_plugins_mysql_default.uri %}

Plugins.Mysql.Default.Uri={{ agent_param_plugins_mysql_default.uri }}
{% endif %}

### Option: Plugins.Mysql.Default.User
#	Username to be used for MySQL authentication. Default value used if no other is specified.
#
# Mandatory: no
# Default:
# Plugins.Mysql.Default.User=
{% if agent_param_plugins_mysql_default is defined and agent_param_plugins_mysql_default.user is defined and agent_param_plugins_mysql_default.user %}

Plugins.Mysql.Default.User={{ agent_param_plugins_mysql_default.user }}
{% endif %}

### Option: Plugins.Mysql.Default.Password
#	Password to be used for MySQL authentication. Default value used if no other is specified.
#
# Mandatory: no
# Default:
# Plugins.Mysql.Default.Password=
{% if agent_param_plugins_mysql_default is defined and agent_param_plugins_mysql_default.password is defined and agent_param_plugins_mysql_default.password %}

Plugins.Mysql.Default.Password={{ agent_param_plugins_mysql_default.password }}
{% endif %}

### Option: Plugins.Mysql.Default.TLSConnect
#	Encryption type for MySQL connection. Default value used if no other is specified.
#		tls connection required     - required
#		verifies certificates       - verify_ca
#		verify certificates and ip  - verify_full
#
# Mandatory: no
# Default:
# Plugins.Mysql.Default.TLSConnect=
{% if agent_param_plugins_mysql_default is defined and agent_param_plugins_mysql_default.tlsconnect is defined and agent_param_plugins_mysql_default.tlsconnect %}

Plugins.Mysql.Default.TLSConnect={{ agent_param_plugins_mysql_default.tlsconnect }}
{% endif %}

### Option: Plugins.Mysql.Default.TLSCAFile
#	Full pathname of a file containing the top-level CA(s) certificates for mysql
#	peer certificate verification. Default value used if no other is specified.
#
# Mandatory: no
# Default:
# Plugins.Mysql.Default.TLSCAFile=
{% if agent_internal_plugins_mysql_default_tls_file_list is defined and agent_internal_plugins_mysql_default_tls_file_list is iterable and agent_internal_plugins_mysql_tls_file_list is not string and agent_internal_plugins_mysql_tls_file_list is not mapping %}

{% for tls_file in agent_internal_plugins_mysql_default_tls_file_list %}
{% if tls_file["type"] == "ca" %}
Plugins.Mysql.Default.TLSCAFile={{ tls_file["target"] }}
{% endif %}
{% endfor %}
{% endif %}

### Option: Plugins.Mysql.Default.TLSCertFile
#	Full pathname of a file containing the mysql certificate or certificate chain.
#   Default value used if no other is specified.
#
# Mandatory: no
# Default:
# Plugins.Mysql.Default.TLSCertFile=
{% if agent_internal_plugins_mysql_default_tls_file_list is defined and agent_internal_plugins_mysql_default_tls_file_list is iterable and agent_internal_plugins_mysql_tls_file_list is not string and agent_internal_plugins_mysql_tls_file_list is not mapping %}

{% for tls_file in agent_internal_plugins_mysql_default_tls_file_list %}
{% if tls_file["type"] == "cert" %}
Plugins.Mysql.Default.TLSCertFile={{ tls_file["target"] }}
{% endif %}
{% endfor %}
{% endif %}

### Option: Plugins.Mysql.Default.TLSKeyFile
#	Full pathname of a file containing the mysql private key. Default value used if no other is specified.
#
# Mandatory: no
# Default:
# Plugins.Mysql.Default.TLSKeyFile=
{% if agent_internal_plugins_mysql_default_tls_file_list is defined and agent_internal_plugins_mysql_default_tls_file_list is iterable and agent_internal_plugins_mysql_tls_file_list is not string and agent_internal_plugins_mysql_tls_file_list is not mapping %}

{% for tls_file in agent_internal_plugins_mysql_default_tls_file_list %}
{% if tls_file["type"] == "key" %}
Plugins.Mysql.Default.TLSKeyFile={{ tls_file["target"] }}
{% endif %}
{% endfor %}
{% endif %}