Плагин MySQL

Обзор

Параметры конфигурации позволяют настраивать поведение плагина MySQL.

Рекомендуется указывать их в отдельном файле конфигурации (например, mysql.conf), а не в файле конфигурации агента 2. Затем используйте директиву Include для подключения этого файла в конфигурацию Zabbix agent 2.

Все параметры являются необязательными, если явно не указано, что параметр обязателен.

Обратите внимание:

  • Значения по умолчанию отражают значения по умолчанию процесса, а не значения в поставляемых файлах конфигурации;
  • Значения поддерживают переменные среды;
  • Zabbix поддерживает файлы конфигурации только в кодировке UTF-8 без BOM;
  • Комментарии, начинающиеся с "#", поддерживаются только в начале строки.

Parameter details

Plugins.Mysql.CallTimeout

Specify the maximum amount of time in seconds to wait for a request to be done.

Default: default timeout Range: 1-30

Plugins.Mysql.CustomQueriesPath

Specify full pathname of the directory containing .sql files with custom queries.

Defaults:
/usr/local/share/zabbix/custom-queries/mysql - for Unix systems,
*:\Program Files\Zabbix Agent 2\Custom Queries\Mysql - for Windows systems (where * is the drive name from the ProgramFiles environment variable)

Plugins.Mysql.CustomQueriesEnabled

Enable execution of the mysql.custom.query item key.
If disabled, no queries will be loaded from the custom query directory path.

Default: false Range: true/false

Plugins.Mysql.Default.Password

Specify the default password for a protected MySQL server.

Plugins.Mysql.Default.TLSConnect

Specify the default level of encryption for communications between Zabbix agent 2 and monitored databases.

Range:
required - require TLS connection;
verify_ca - verify certificates;
verify_full - verify certificates and IP address

Plugins.Mysql.Default.TLSCAFile

Specify full pathname of the file containing top-level CA(s) certificates for peer certificate verification, used for encrypted communications between Zabbix agent 2 and monitored databases.

Mandatory: yes, if Plugins.Mysql.Default.TLSConnect is set to verify_ca or verify_full

Plugins.Mysql.Default.TLSCertFile

Specify full pathname of the file containing the agent certificate or certificate chain, used for encrypted communications between Zabbix agent 2 and monitored databases.

Mandatory: yes, if Plugins.Mysql.Default.TLSKeyFile is specified

Plugins.Mysql.Default.TLSKeyFile

Specify full pathname of the file containing the database private key, used for encrypted communications between Zabbix agent 2 and monitored databases.

Mandatory: yes, if Plugins.Mysql.Default.TLSCertFile is specified

Plugins.Mysql.Default.Uri

Specify the default URI for connecting to MySQL server.
Embedded credentials will be ignored.
Supported schemes: tcp, unix
The schema can be omitted.
The port can be omitted (default=3306).

Examples:

tcp://localhost:3306
localhost
unix:/var/run/mysql.sock
Plugins.Mysql.Default.User

Specify the default username for a protected MySQL server.

Plugins.Mysql.KeepAlive

Specify the maximum time of waiting (in seconds) before unused plugin connections are closed.

Default: 300 Range: 60-900

Plugins.Mysql.Sessions.<SessionName>.Password

Specify the named session password for a protected MySQL server.
<SessionName> - define name of a session for using in item keys.

Plugins.Mysql.Sessions.<SessionName>.TLSConnect

Specify the level of named-session encryption for communications between Zabbix agent 2 and monitored databases.
<SessionName> - define name of a session for using in item keys.

Range:
required - require TLS connection;
verify_ca - verify certificates;
verify_full - verify certificates and IP address

Plugins.Mysql.Sessions.<SessionName>.TLSCAFile

Specify full pathname of the file containing top-level CA(s) certificates for named-session peer certificate verification, used for encrypted communications between Zabbix agent 2 and monitored databases.
<SessionName> - define name of a session for using in item keys.

Mandatory: yes, if Plugins.Mysql.Sessions.<SessionName>.TLSConnect is set to verify_ca or verify_full

Plugins.Mysql.Sessions.<SessionName>.TLSCertFile

Specify full pathname of the file containing the named-session agent certificate or certificate chain, used for encrypted communications between Zabbix agent 2 and monitored databases.
<SessionName> - define name of a session for using in item keys.

Mandatory: yes, if Plugins.Mysql.Sessions.<SessionName>.TLSKeyFile is specified

Plugins.Mysql.Sessions.<SessionName>.TLSKeyFile

Specify full pathname of the file containing the named-session database private key, used for encrypted communications between Zabbix agent 2 and monitored databases.
<SessionName> - define name of a session for using in item keys.

Mandatory: yes, if Plugins.Mysql.Sessions.<SessionName>.TLSCertFile is specified

Plugins.Mysql.Sessions.<SessionName>.Uri

Specify the named session URI for connecting to MySQL server.
<SessionName> - define name of a session for using in item keys.
Embedded credentials will be ignored.
Supported schemes: tcp, unix
The schema can be omitted.
The port can be omitted (default=3306).

Examples:

tcp://localhost:3306
localhost
unix:/var/run/mysql.sock
Plugins.Mysql.Sessions.<SessionName>.User

Specify the named session username for a protected MySQL server.
<SessionName> - define name of a session for using in item keys.

Plugins.Mysql.Timeout

Set the maximum time in seconds for waiting when a connection has to be established.

Default: default timeout Range: 1-30

Параметры

Parameter Mandatory Range Default Description
Plugins.Mysql.CallTimeout no 1-30 global timeout Максимальное время ожидания выполнения запроса в секундах.
Plugins.Mysql.CustomQueriesPath no /usr/local/share/zabbix/custom-queries/mysql для систем Unix

*:\Program Files\Zabbix Agent 2\Custom Queries\Mysql для систем Windows, где * — имя диска из переменной среды ProgramFiles
Полный путь к каталогу, содержащему файлы .sql с пользовательскими запросами.
Plugins.Mysql.CustomQueriesEnabled no false Если задано, включает выполнение ключа элемента данных mysql.custom.query. Если отключено, запросы не будут загружаться из пути к каталогу пользовательских запросов.
Plugins.Mysql.Default.Password no Пароль по умолчанию для подключения к MySQL; используется, если значение не указано в ключе элемента данных или именованной сессии.
Plugins.Mysql.Default.TLSCAFile no
(yes, if Plugins.Mysql.Default.TLSConnect is set to verify_ca or verify_full)
Полный путь к файлу, содержащему сертификаты корневого CA(ов) для проверки сертификата узла при зашифрованной связи между агентом Zabbix 2 и контролируемыми базами данных; используется, если значение не указано в именованной сессии.
Plugins.Mysql.Default.TLSCertFile no
(yes, if Plugins.Mysql.Default.TLSConnect is set to verify_ca or verify_full)
Полный путь к файлу, содержащему сертификат агента или цепочку сертификатов для зашифрованной связи между агентом Zabbix 2 и контролируемыми базами данных; используется, если значение не указано в именованной сессии.
Plugins.Mysql.Default.TLSConnect no Тип шифрования для связи между агентом Zabbix 2 и контролируемыми базами данных; используется, если значение не указано в именованной сессии.

Поддерживаемые значения:
required - требуется TLS-соединение;
verify_ca - проверка сертификатов;
verify_full - проверка сертификатов и IP-адреса.
Plugins.Mysql.Default.TLSKeyFile no
(yes, if Plugins.Mysql.Default.TLSConnect is set to verify_ca or verify_full)
Полный путь к файлу, содержащему закрытый ключ базы данных для зашифрованной связи между агентом Zabbix 2 и контролируемыми базами данных; используется, если значение не указано в именованной сессии.
Plugins.Mysql.Default.Uri no tcp://localhost:3306 URI по умолчанию для подключения к MySQL; используется, если значение не указано в ключе элемента данных или именованной сессии.

Не должен содержать встроенные учетные данные (они будут проигнорированы).
Должен соответствовать формату URI.
Поддерживаемые схемы: tcp, unix; схема может быть опущена.
Порт может быть опущен (по умолчанию=3306).
Примеры: tcp://localhost:3306
localhost
unix:/var/run/mysql.sock
Plugins.Mysql.Default.User no Имя пользователя по умолчанию для подключения к MySQL; используется, если значение не указано в ключе элемента данных или именованной сессии.
Plugins.Mysql.KeepAlive no 60-900 300 Максимальное время ожидания (в секундах) перед закрытием неиспользуемых подключений плагина.
Plugins.Mysql.Sessions.<SessionName>.Password no Пароль именованной сессии.
<SessionName> - задает имя сессии для использования в ключах элементов данных.
Plugins.Mysql.Sessions.<SessionName>.TLSCAFile no
(yes, if Plugins.Mysql.Sessions.<SessionName>.TLSConnect is set to verify_ca or verify_full)
Полный путь к файлу, содержащему сертификаты корневого CA(ов) для проверки сертификата узла, используемый для зашифрованной связи между агентом Zabbix 2 и контролируемыми базами данных.
<SessionName> - задает имя сессии для использования в ключах элементов данных.
Plugins.Mysql.Sessions.<SessionName>.TLSCertFile yes, if Plugins.Mysql.Sessions.<SessionName>.TLSKeyFile is specified Полный путь к файлу, содержащему сертификат агента или цепочку сертификатов, используемый для зашифрованной связи между агентом Zabbix 2 и контролируемыми базами данных.
<SessionName> - задает имя сессии для использования в ключах элементов данных.
Plugins.Mysql.Sessions.<SessionName>.TLSConnect no Тип шифрования для связи между агентом Zabbix 2 и контролируемыми базами данных.
<SessionName> - задает имя сессии для использования в ключах элементов данных.

Поддерживаемые значения:
required - требуется TLS-соединение;
verify_ca - проверка сертификатов;
verify_full - проверка сертификатов и IP-адреса.
Plugins.Mysql.Sessions.<SessionName>.TLSKeyFile yes, if Plugins.Mysql.Sessions.<SessionName>.TLSCertFile is specified Полный путь к файлу, содержащему закрытый ключ базы данных, используемый для зашифрованной связи между агентом Zabbix 2 и контролируемыми базами данных.
<SessionName> - задает имя сессии для использования в ключах элементов данных.
Plugins.Mysql.Sessions.<SessionName>.Uri no Строка подключения именованной сессии.
<SessionName> - задает имя сессии для использования в ключах элементов данных.

Не должен содержать встроенные учетные данные (они будут проигнорированы).
Должен соответствовать формату URI.
Поддерживаемые схемы: tcp, unix; схема может быть опущена.
Порт может быть опущен (по умолчанию=3306).
Примеры: tcp://localhost:3306
localhost
unix:/var/run/mysql.sock
Plugins.Mysql.Sessions.<SessionName>.User no Имя пользователя именованной сессии.
<SessionName> - задает имя сессии для использования в ключах элементов данных.
Plugins.Mysql.Timeout no 1-30 global timeout Максимальное время ожидания в секундах при установлении соединения.

См. также: